Skip to content

Commit d2a61c4

Browse files
committed
Update to use the latest interface definition (which includes errors)
1 parent ca61d5c commit d2a61c4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docker/gopath/src/xogeny/pubbook/pubbook.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func runmake(dir string, targets...string) error {
4747
return nil;
4848
}
4949

50-
func (b Builder) Push(msg hs.PushMessage, params map[string][]string) {
50+
func (b Builder) Push(msg hs.PushMessage, params map[string][]string) error {
5151
user := msg.Repository.Owner.Name;
5252
url := msg.Repository.GitUrl;
5353
ref := msg.After;
@@ -75,15 +75,15 @@ func (b Builder) Push(msg hs.PushMessage, params map[string][]string) {
7575

7676
if (exists) {
7777
err = git(dir, "fetch", "origin");
78-
if (err!=nil) { return; }
78+
if (err!=nil) { return err; }
7979
} else {
8080
err = git(".", "clone", url, dir);
81-
if (err!=nil) { return; }
81+
if (err!=nil) { return err; }
8282
}
8383

8484
/* Repo checkout correct ref */
8585
err = git(dir, "checkout", ref)
86-
if err != nil { return; }
86+
if err != nil { return err; }
8787

8888
wd, err := os.Getwd();
8989
if (err!=nil) {
@@ -96,17 +96,18 @@ func (b Builder) Push(msg hs.PushMessage, params map[string][]string) {
9696
// If it didn't already exist, we need to run some make targets
9797
/* Run make */
9898
err = runmake(dir, "specs");
99-
if (err!=nil) { return; }
99+
if (err!=nil) { return err; }
100100
}
101101

102102
err = runmake(dir, "results");
103-
if (err!=nil) { return; }
103+
if (err!=nil) { return err; }
104104

105105
args := append(targets, bucket, s3flags);
106106
err = runmake(dir, args...);
107-
if (err != nil) { return; }
107+
if (err != nil) { return err; }
108108

109109
log.Printf("Make ran!");
110+
return nil;
110111
}
111112

112113
func main() {

0 commit comments

Comments
 (0)