2023-07-09 00:39:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2023-11-15 14:28:41 +00:00
|
|
|
go install github.com/goreleaser/goreleaser@v1.22.1
|
2023-09-18 06:02:48 +00:00
|
|
|
|
2023-12-11 03:15:49 +00:00
|
|
|
if [ ! -z "$harbor_username"]; then
|
|
|
|
DOCKER_FILE=~/.docker/config.json
|
|
|
|
if [ ! -e $DOCKER_FILE ]; then
|
|
|
|
mkdir -p ~/.docker/
|
|
|
|
export harbor_auth=`cat /dev/null | jq -s -r '[ env.harbor_username, env.harbor_password ] | join(":") | @base64'`
|
|
|
|
echo '{"auths":{"harbor.ntppool.org":{"auth":""}}}' | jq '.auths["harbor.ntppool.org"].auth=env.harbor_auth' > $DOCKER_FILE
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2023-07-09 00:39:36 +00:00
|
|
|
DRONE_TAG=${DRONE_TAG-""}
|
|
|
|
|
|
|
|
is_snapshot=""
|
|
|
|
|
|
|
|
if [ -z "$DRONE_TAG" ]; then
|
|
|
|
is_snapshot="--snapshot"
|
|
|
|
fi
|
|
|
|
|
2023-10-14 11:10:33 +00:00
|
|
|
goreleaser release $is_snapshot -p 6 --skip=publish
|