Ensure automation uses pinned go-licenses version

This commit is contained in:
Andy Feller 2025-06-23 13:22:27 -04:00
parent 9ce1aeeb1c
commit 728e973a20
3 changed files with 11 additions and 2 deletions

View file

@ -54,8 +54,11 @@ jobs:
# actions/setup-go does not setup the installed toolchain to be preferred over the system install,
# which causes go-licenses to raise "Package ... does not have module info" errors.
# for more information, https://github.com/google/go-licenses/issues/244#issuecomment-1885098633
#
# go-licenses has been pinned for automation use.
- name: Check licenses
run: |
export GOROOT=$(go env GOROOT)
export PATH=${GOROOT}/bin:$PATH
go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e
make licenses-check

View file

@ -1,6 +1,9 @@
#!/bin/bash
go install github.com/google/go-licenses@latest
# Manage go-licenses version externally for CI
if [ "$CI" != "true" ]; then
go install github.com/google/go-licenses@latest
fi
# Setup temporary directory to collect updated third-party source code
export TEMPDIR="$(mktemp -d)"

View file

@ -1,6 +1,9 @@
#!/bin/bash
go install github.com/google/go-licenses@latest
# Manage go-licenses version externally for CI
if [ "$CI" != "true" ]; then
go install github.com/google/go-licenses@latest
fi
# Setup temporary directory for generated license reports
export TEMPDIR="$(mktemp -d)"