aboutsummaryrefslogtreecommitdiff
path: root/docker.go
blob: 472a4013e5246d60636b54e5cca2e8ff72f0a382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//+build ignore

// Makes the docker image xena/xperimental.
package main

import (
	"context"
	"log"

	"github.com/Xe/x/internal/yeet"
)

func main() {
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	tag := "xena/xperimental"
	yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "build", "-t", tag, ".")

	resTag, err := yeet.DockerTag(ctx, "xena", "xperimental", tag)
	if err != nil {
		log.Fatal(err)
	}

	yeet.ShouldWork(ctx, nil, yeet.WD, "docker", "push", resTag)

	log.Printf("use %s", resTag)
}