Files
common/scripts/run-goreleaser
Ask Bjørn Hansen 988e07ade5 fix(tracing): treat resource detector errors as non-fatal
processOwnerDetector calls os/user.Current(), which fails in non-cgo
builds when the running UID has no /etc/passwd entry and $USER is unset
(common on hardened/distroless containers). It returns a plain error,
not ErrPartialResource, so the previous gate let the error escape and
SetupSDK aborted process startup.

Resource detection is documented as best-effort; downgrade any detector
error to a warning and fall back to an empty resource if the SDK returns
nil. The signature is preserved.
2026-05-02 22:00:09 -07:00

25 lines
646 B
Bash
Executable File

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