summaryrefslogtreecommitdiff
path: root/commits.go
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2017-07-20 08:13:37 +0100
committerKatolaZ <katolaz@freaknet.org>2017-07-20 08:13:37 +0100
commit7a4cdc99d9242303c84be398f8b9c296b62c0a27 (patch)
tree8dc80279915d76aa61ef4e846036fcae6ade7a41 /commits.go
parent37a6d33f46d81109ce5dfa0f79ea52395ac7762d (diff)
moved stuff in exec.go
Diffstat (limited to 'commits.go')
-rw-r--r--commits.go20
1 files changed, 4 insertions, 16 deletions
diff --git a/commits.go b/commits.go
index 4f2f451..68c8099 100644
--- a/commits.go
+++ b/commits.go
@@ -94,18 +94,6 @@ func find_tag_config(tag_name string, w *SCORSHworker) (*SCORSHtag_cfg, bool) {
return nil, false
}
-func exec_tag(tag *SCORSHtag_cfg) []error {
-
- var ret []error
-
- for _, c := range tag.Commands {
- debug.log("[tag: %s] attempting command: %s\n", tag.Name, c.URL)
-
- ret = append(ret, nil)
- }
- return ret
-}
-
// traverse all the commits between two references, looking for scorsh
// commands
// fixme: we don't have just one keyring here....
@@ -182,6 +170,7 @@ func walk_commits(msg SCORSHmsg, w *SCORSHworker) error {
debug.log("[worker: %s] good_tag: %s\n", w.Name, good_tag)
if !good_tag {
+ debug.log("[worker: %s] unsupported tag: %s\n", w.Name, t.Tag)
continue
}
@@ -190,20 +179,19 @@ func walk_commits(msg SCORSHmsg, w *SCORSHworker) error {
debug.log("[worker: %s] good_keys: %s\n", w.Name, good_keys)
if !good_keys {
+ debug.log("[worker: %s] no matching keys for tag: %s\n", w.Name, t.Tag)
continue
}
// c) If everything is OK, execute the tag
if good_tag && good_keys {
- errs := exec_tag(tag_cfg)
+ env := set_environment(&msg)
+ errs := exec_tag(tag_cfg, t.Args, env)
debug.log("[worker: %s] errors in tag %s: %s\n", w.Name, t.Tag, errs)
}
}
}
- //signature, signed, err := check_signature(commit, &w.Keys)
- //_, _, err := check_signature(commit, w.keys)
-
cur_commit = commit.Parent(0)
} else {
fmt.Printf("Commit %x not found!\n", cur_commit.Id())