Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions licenses/licenses
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -e
#!/bin/bash
set -eo pipefail

# Get the directory where this script is located
bin_dir="$(cd "$(dirname "$0")" && pwd)"
Expand Down
6 changes: 3 additions & 3 deletions licenses/list-licenses
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -e
#!/bin/bash
set -eo pipefail

bin_dir="$(cd "$(dirname "$0")" && pwd)"

Expand Down Expand Up @@ -32,7 +32,7 @@ if [ -f go.mod ]; then
if [ -z "$go_packages" ]; then
echo "No Go modules found" >&2
else
echo "$go_packages" | xargs -I {} sh -c '.bin/go-licenses report --template .bin/license-template-go.tpl {}' | grep -v '^$'
echo "$go_packages" | xargs -I {} "${bin_dir}/go-licenses" report --template "${bin_dir}/license-template-go.tpl" {} | grep -v '^$'
echo
fi
fi
11 changes: 10 additions & 1 deletion licenses/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@ runs:
# a pull request then we can checkout the head.
fetch-depth: 2
token: ${{ inputs.token || github.token }}
# Install the Go version the repository requires. With a fixed, older
# version, the go command fetches the required toolchain into the module
# cache instead, where go-licenses cannot identify standard-library
# packages and fails with "Package <std> does not have module info".
- uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
if: hashFiles('go.mod') != ''
with:
go-version: "1.23"
go-version-file: go.mod
- uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
if: hashFiles('go.mod') == ''
with:
go-version: "stable"
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
Expand Down
Loading