-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·35 lines (25 loc) · 882 Bytes
/
release.sh
File metadata and controls
executable file
·35 lines (25 loc) · 882 Bytes
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
29
30
31
32
#!/bin/bash
set -ex
dir=$(realpath "$(dirname "$0")")
cd "$dir"
TIMESTAMP=$(date +'%Y-%m-%d')
IMAGE_NAME='tiltdev/restart-helper'
IMAGE_WITH_TAG=$IMAGE_NAME:$TIMESTAMP
# build binary for tilt-restart-wrapper
env GOOS=linux GOARCH=amd64 go build tilt-restart-wrapper.go
BUILDER=buildx-multiarch
docker buildx inspect $BUILDER || docker buildx create --name=$BUILDER --driver=docker-container --driver-opt=network=host
# build Docker image with static binaries of:
# - tilt-restart-wrapper (compiled above)
# - entr (dependency of tilt-restart-wrapper)
docker buildx build \
--builder=$BUILDER \
--push \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
-t "$IMAGE_NAME" .
docker buildx build \
--builder=$BUILDER \
--push \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
-t "$IMAGE_WITH_TAG" .
echo "Successfully built and pushed $IMAGE_WITH_TAG"