Skip to content

Commit

Permalink
autogen: update license overview
Browse files Browse the repository at this point in the history
  • Loading branch information
ory-bot committed Jan 10, 2025
1 parent 2f7806d commit e97346f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .bin/license-engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ALLOWED_LICENSES=(
'BSD-3-Clause'
'(BSD-3-Clause OR GPL-2.0)'
'BSD-3-Clause OR MIT'
'(BSD-3-Clause AND Apache-2.0)'
'CC0-1.0'
'CC-BY-3.0'
'CC-BY-4.0'
Expand Down Expand Up @@ -73,6 +74,12 @@ APPROVED_MODULES=(
'github.com/jmespath/go-jmespath' # Apache-2.0 https://github.com/jmespath/go-jmespath/blob/master/LICENSE
'github.com/ory/keto/proto/ory/keto/opl/v1alpha1' # Apache-2.0 - submodule of keto
'github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2' # Apache-2.0 - submodule of keto
'@ory-corp/.*' # Ory IP
'github.com/apache/arrow/.*' # Apache-2.0 https://github.com/apache/arrow/blob/main/LICENSE.txt
'github.com/ory-corp/webhook-target' # Ory IP
'@ory/keto-grpc-client.*' # Apache-2.0 - submodule of keto
'[email protected]' # MIT: https://github.com/Rich-Harris/golden-fleece/blob/master/LICENSE
'github.com/gogo/googleapis/.*' # Apache-2.0 https://github.com/gogo/googleapis/blob/master/LICENSE
)

# These lines in the output should be ignored (plain text, no regex).
Expand Down
12 changes: 5 additions & 7 deletions .bin/list-licenses
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ bin_dir="$(cd "$(dirname "$0")" && pwd)"
# list Node licenses
if [ -f package.json ]; then
if jq -e '.dependencies and (.dependencies | keys | length > 0)' package.json >/dev/null; then
npm install >/dev/null 2>&1
npm exec --yes license-checker -- --production --csv --excludePrivatePackages --customPath "${bin_dir}"/license-template-node.json | grep -v '^$'
{ echo; } 2>/dev/null
npx --yes license-checker --production --csv --excludePrivatePackages --customPath "${bin_dir}"/license-template-node.json | grep -v '^$'
echo
else
echo "No dependencies found in package.json" >&2
{ echo; } 2>/dev/null
echo
fi
fi

Expand All @@ -26,15 +25,14 @@ if [ -f go.mod ]; then
sort -u |
awk -F/ '{ if ($1 == "github.com" && NF >= 3) { print $1"/"$2"/"$3 } else { print } }' |
sort -u
{ echo; } 2>/dev/null
)
if [ -z "$go_modules" ]; then
echo "No Go modules found" >&2
else
# Workaround until https://github.com/google/go-licenses/issues/307 is fixed
# .bin/go-licenses report "$module_name" --template .bin/license-template-go.tpl 2>/dev/null
#
echo "$go_modules" | xargs -I {} sh -c '.bin/go-licenses report --template .bin/license-template-go.tpl {}' 2>/dev/null | grep -v '^$'
{ echo; } 2>/dev/null
echo "$go_modules" | xargs -I {} sh -c '.bin/go-licenses report --template .bin/license-template-go.tpl {}' | grep -v '^$'
echo
fi
fi

0 comments on commit e97346f

Please sign in to comment.