diff --git a/.github/scripts/LICENSE_TEMPLATE b/.github/scripts/LICENSE_TEMPLATE new file mode 100644 index 000000000..080a93268 --- /dev/null +++ b/.github/scripts/LICENSE_TEMPLATE @@ -0,0 +1 @@ +Copyright (c) {{.Year}} Airbyte, Inc., all rights reserved. diff --git a/.github/scripts/add_copyright.sh b/.github/scripts/add_copyright.sh new file mode 100755 index 000000000..c6e0e8bd5 --- /dev/null +++ b/.github/scripts/add_copyright.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +YEAR=$(date +%Y) + +if ! command -v addlicense &> /dev/null; then + echo "Installing addlicense..." + go install github.com/google/addlicense@latest + export PATH=$PATH:$(go env GOPATH)/bin +fi + +addlicense -c "Airbyte, Inc." -l copyright -v -y "$YEAR" -f .github/scripts/LICENSE_TEMPLATE "$@" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9241ce07..e5b8b98c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,6 @@ repos: hooks: - id: addlicense name: Add license headers - entry: addlicense -c "Airbyte, Inc." -l apache -v -f LICENSE_SHORT - language: golang - additional_dependencies: [github.com/google/addlicense@v1.1.1] + entry: .github/scripts/add_copyright.sh + language: system files: \.py$ diff --git a/LICENSE_SHORT b/LICENSE_SHORT deleted file mode 100644 index 01fbe9753..000000000 --- a/LICENSE_SHORT +++ /dev/null @@ -1 +0,0 @@ -Copyright (c) 2025 Airbyte, Inc., all rights reserved.