Private
Public Access
1
0
Files
data-api/scripts/run-goreleaser
Ask Bjørn Hansen 058531c362
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Update Go and dependencies
2024-12-27 17:38:58 -08:00

25 lines
632 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
go install github.com/goreleaser/goreleaser/v2@v2.5.0
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
DRONE_TAG=${DRONE_TAG-""}
is_snapshot=""
if [ -z "$DRONE_TAG" ]; then
is_snapshot="--snapshot"
fi
goreleaser release $is_snapshot -p 6 --skip=publish