From 2a73e72c2f4bec8eb53120e8881655b56966b85f Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 26 Jun 2019 21:28:11 +0000 Subject: internal/yeet: fix DockerBuild, oops --- docker.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'docker.go') diff --git a/docker.go b/docker.go index 91d5637..d99f3f6 100644 --- a/docker.go +++ b/docker.go @@ -5,13 +5,19 @@ package main import ( "context" + "flag" "log" "path/filepath" "within.website/x/internal/yeet" ) +var ( + dontPush = flag.Bool("dont-push", false, "if set, don't push docker images") +) + func main() { + flag.Parse() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -35,10 +41,12 @@ func main() { yeet.DockerBuild(ctx, filepath.Join(yeet.WD, "cmd", "h"), hTag, "--build-arg", "X_VERSION="+gitTag) - yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", resTag) - yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", otherResTag) - yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", dnsdGithubTag) - yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", hTag) + if !*dontPush { + yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", resTag) + yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", otherResTag) + yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", dnsdGithubTag) + yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", hTag) + } log.Printf("xperimental:\t%s", otherResTag) log.Printf("dnsd:\t%s", dnsdGithubTag) -- cgit v1.2.3