From 379fcc3e0aafd2e102e4864244bce1b11c5bf255 Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 16:52:54 +0100 Subject: [PATCH] chore: add additional licenses and option to force installation of templates (#167) --- licenses/install | 23 +++++++++++++++++++++-- licenses/license-engine.sh | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/licenses/install b/licenses/install index 4feda35..290f056 100755 --- a/licenses/install +++ b/licenses/install @@ -1,14 +1,33 @@ #!/bin/sh set -e +# Default mono-install to false +FULL_INSTALL=false + +# Parse command line arguments +while [ "$#" -gt 0 ]; do + case "$1" in + --full-install) + FULL_INSTALL=true + shift + ;; + *) + echo "Unknown parameter: $1" + exit 1 + ;; + esac +done + { echo echo "Installing license checker engine ..." echo } 2>/dev/null + if [ ! -d .bin ]; then mkdir .bin fi + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-engine.sh -o .bin/license-engine.sh chmod +x .bin/license-engine.sh curl https://raw.githubusercontent.com/ory/ci/master/licenses/licenses -o .bin/licenses @@ -16,7 +35,7 @@ chmod +x .bin/licenses curl https://raw.githubusercontent.com/ory/ci/master/licenses/list-licenses -o .bin/list-licenses chmod +x .bin/list-licenses -if [ -f go.mod ]; then +if [ "$FULL_INSTALL" = true ] || [ -f go.mod ]; then { echo echo "Installing the Go license checker ..." @@ -26,7 +45,7 @@ if [ -f go.mod ]; then curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl fi -if [ -f package.json ]; then +if [ "$FULL_INSTALL" = true ] || [ -f package.json ]; then { echo echo "Installing the Node license checker ..." diff --git a/licenses/license-engine.sh b/licenses/license-engine.sh index 13e7a80..7d6ec1c 100755 --- a/licenses/license-engine.sh +++ b/licenses/license-engine.sh @@ -79,6 +79,7 @@ APPROVED_MODULES=( 'github.com/ory-corp/webhook-target' # Ory IP '@ory/keto-grpc-client.*' # Apache-2.0 - submodule of keto 'golden-fleece@1.0.9' # 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).