aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorXe <me@christine.website>2023-01-21 15:22:27 -0500
committerXe <me@christine.website>2023-01-21 15:36:30 -0500
commit255d527c651c2a5b1ba82969d13b6df7a33517c7 (patch)
treebc9aab56ad743493a79644599eb32de22b10f6a4 /internal
parent4e67062641cbaf7b3a08248ca1cc7661187d9c16 (diff)
downloadx-255d527c651c2a5b1ba82969d13b6df7a33517c7.tar.xz
x-255d527c651c2a5b1ba82969d13b6df7a33517c7.zip
cmd/xedn: resizing of stickers
Signed-off-by: Xe <me@christine.website>
Diffstat (limited to 'internal')
-rw-r--r--internal/yeet/yeet.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/yeet/yeet.go b/internal/yeet/yeet.go
index 25ded2f..7868701 100644
--- a/internal/yeet/yeet.go
+++ b/internal/yeet/yeet.go
@@ -96,3 +96,24 @@ func DockerBuild(ctx context.Context, dir, tag string, args ...string) {
args = append(args, ".")
ShouldWork(ctx, nil, dir, "docker", args...)
}
+
+// DockerLoadResult loads a nix-built docker image
+func DockerLoadResult(ctx context.Context, at string) {
+ c := exec.CommandContext(ctx, "docker", "load")
+ c.Env = os.Environ()
+ fin, err := os.Open(at)
+ if err != nil {
+ panic(err)
+ }
+ defer fin.Close()
+ c.Stdin = fin
+
+ if err := c.Run(); err != nil {
+ panic(err)
+ }
+}
+
+// DockerPush pushes a docker image to a given host
+func DockerPush(ctx context.Context, image string) {
+ ShouldWork(ctx, nil, WD, "docker", "push", image)
+}