Skip to content

Commit

Permalink
feat: detect ibm_catalog.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ARYA GIRISH K authored and ARYA GIRISH K committed Nov 11, 2024
1 parent c87742a commit b463f42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion module-assets/ci/license_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ if git remote -v | head -n 1 | grep -q "github.ibm"; then
exit 0
fi


# ensure LICENSE file exists if .tf file is detected in root directory
count=$(find ./*.tf 2>/dev/null | wc -l | xargs)

count=$(find ./ -type f \( -name *.tf -o -name ibm_catalog.json \) 2>/dev/null | wc -l | xargs)
if [ "$count" != 0 ]; then
if [[ ! -f "LICENSE" ]]; then
echo "Required LICENSE file is missing. Please add it and try again."
exit 1
fi
fi


0 comments on commit b463f42

Please sign in to comment.