Skip to content

Commit

Permalink
addlicense script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
  • Loading branch information
michael-valdron committed Sep 18, 2023
1 parent e08a3c1 commit 85263aa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions add_licenses.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# This script adds license headers that are missing from go files


if ! command -v addlicense 2> /dev/null
then
echo "error addlicense must be installed with this command: go install github.com/google/addlicense@latest" && exit 1
else
echo 'addlicense -v -f license_header.txt **/*.go'
addlicense -v -f license_header.txt $(find . -not -path '*/\.*' -not -path '*/vendor/*' -name '*.go')
fi


0 comments on commit 85263aa

Please sign in to comment.