aboutsummaryrefslogtreecommitdiff
path: root/docker.go
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2018-10-10 04:35:01 +0000
committerChristine Dodrill <me@christine.website>2018-10-10 04:35:01 +0000
commit6f56286a19da821f8b5ebbe60086e935a171b7bb (patch)
treec70fab96e3d3bb321bcb0aff0524b00c67246356 /docker.go
parentacf7336eed51728d5061e3bc6cda92cf8eae5998 (diff)
downloadx-6f56286a19da821f8b5ebbe60086e935a171b7bb.tar.xz
x-6f56286a19da821f8b5ebbe60086e935a171b7bb.zip
internal: create package yeet
Diffstat (limited to 'docker.go')
-rw-r--r--docker.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/docker.go b/docker.go
index 420177a..472a401 100644
--- a/docker.go
+++ b/docker.go
@@ -7,17 +7,22 @@ import (
"context"
"log"
- "github.com/Xe/x/internal"
+ "github.com/Xe/x/internal/yeet"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
- tag := "xena/xperimental:" + internal.DateTag
+ tag := "xena/xperimental"
+ yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "build", "-t", tag, ".")
- internal.ShouldWork(ctx, nil, internal.WD, "docker", "build", "-t", tag, ".")
- internal.ShouldWork(ctx, nil, internal.WD, "docker", "push", tag)
+ resTag, err := yeet.DockerTag(ctx, "xena", "xperimental", tag)
+ if err != nil {
+ log.Fatal(err)
+ }
- log.Printf("use %s", tag)
+ yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", resTag)
+
+ log.Printf("use %s", resTag)
}