Merge pull request #9677 from glours/use-google-addlicence

use Google addlicense instead of kunalkushwaha/ltag
This commit is contained in:
Guillaume Lours 2022-07-28 11:45:13 +02:00 committed by GitHub
commit def189fae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -90,7 +90,7 @@ RUN --mount=target=. \
make -f builder.Makefile test
FROM base AS check-license-headers
RUN go install github.com/kunalkushwaha/ltag@latest
RUN go install github.com/google/addlicense@latest
RUN --mount=target=. \
make -f builder.Makefile check-license-headers

View File

@ -1,6 +1,6 @@
#!/usr/bin/env sh
# Copyright Docker Compose CLI authors
# Copyright 2020,2022 Docker Compose CLI authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -16,12 +16,12 @@
set -eu -o pipefail
if ! command -v ltag; then
>&2 echo "ERROR: ltag not found. Install with:"
>&2 echo " go get -u github.com/kunalkushwaha/ltag"
if ! command -v addlicense; then
>&2 echo "ERROR: addlicense not found. Install with:"
>&2 echo " go install -u github.com/google/addlicense@latest"
exit 1
fi
BASEPATH="${1-}"
ltag -t "${BASEPATH}scripts/validate/template" -excludes "validate testdata resolvepath" --check -v
find . -regex '.*\.sh' -o -regex '.*\.go' -o -regex '.*Makefile' -o -regex '.*Dockerfile' | xargs addlicense -check -l apache -c 'Docker Compose CLI authors' -ignore validate -ignore testdata -ignore resolvepath -v 1>&2