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 committed Nov 13, 2024
1 parent b463f42 commit 407ccf0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions module-assets/ci/license_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ if git remote -v | head -n 1 | grep -q "github.ibm"; then
fi


# ensure LICENSE file exists if .tf file is detected in root directory
# ensure LICENSE file exists if .tf file is detected incd root directory

count=$(find ./ -type f \( -name *.tf -o -name ibm_catalog.json \) 2>/dev/null | wc -l | xargs)
count=$(find . -maxdepth 1 \( -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 407ccf0

Please sign in to comment.