Skip to content

Commit cba5c0a

Browse files
committed
Disable VCS stamping for license verification
1 parent b329467 commit cba5c0a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

hack/update/licenses.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ OUTDIR="LICENSES" # under $ROOT
2424
# Ensure the tool is built and up-to-date
2525
GO_LICENSES_BIN="$(bash "${ROOT}/hack/run-tool.sh" --print-bin-path go-licenses)"
2626

27+
# go-licenses runs in temporary verification worktrees that do not have enough
28+
# VCS metadata for Go's build stamping.
29+
if [[ -n "${GOFLAGS:-}" ]]; then
30+
export GOFLAGS="${GOFLAGS} -buildvcs=false"
31+
else
32+
export GOFLAGS="-buildvcs=false"
33+
fi
34+
2735
# Clean out previous licenses
2836
rm -rf "${OUTDIR}"
2937
mkdir -p "${OUTDIR}"

0 commit comments

Comments
 (0)