diff --git a/release.sh b/release.sh new file mode 100755 index 00000000..d8f88822 --- /dev/null +++ b/release.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Usage: TAG=0.0.1 ./release.sh + +set -e + +BASE_IMAGE=alpine:3.12 +GOARCH=amd64 +DOCKER_REGISTRY=castai/kilo + +if [ "$TAG" == "" ] +then + echo "TAG is not set" + exit 1 +fi + +GOOS=linux GOARCH=$GOARCH go build -o ./bin/linux/$GOARCH/kg ./cmd/kg +docker build -t $DOCKER_REGISTRY:$TAG --build-arg FROM=$BASE_IMAGE --build-arg GOARCH=$GOARCH . +docker push $DOCKER_REGISTRY:$TAG