From 4eb56fd840c85ddad114e1ae68eae401a661bf76 Mon Sep 17 00:00:00 2001 From: Guillaume Lours Date: Tue, 26 Jul 2022 15:13:34 +0200 Subject: [PATCH] use Google addlicense instead of kunalkushwaha/ltag Signed-off-by: Guillaume Lours --- Dockerfile | 2 +- scripts/validate/fileheader | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45d2cc213..e24a0fc17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/scripts/validate/fileheader b/scripts/validate/fileheader index 8b503df36..abb30b03f 100755 --- a/scripts/validate/fileheader +++ b/scripts/validate/fileheader @@ -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 \ No newline at end of file +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 \ No newline at end of file