workaround and fixes for MPL and copywrite bot (#18775)

This commit is contained in:
modrake
2023-10-17 00:02:13 -07:00
committed by GitHub
parent 349c032369
commit 51ffe4208e
12 changed files with 82 additions and 6 deletions

14
scripts/copywrite-exceptions.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
# Used as a stopgap for copywrite bot in MPL-licensed subdirs, detects BUSL licensed
# headers and deletes them, then runs the copywrite bot to utilize local subdir config
# to inject correct headers.
find . -type f -name '*.go' | while read line; do
if grep "SPDX-License-Identifier: BUSL-1.1" $line; then
sed -i '/SPDX-License-Identifier: BUSL-1.1/d' $line
sed -i '/Copyright (c) HashiCorp, Inc./d' $line
fi
done
copywrite headers --plan