Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : Detect ibm_catalog.json #1067

Merged
merged 7 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions module-assets/ci/license_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ 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)

# ensure LICENSE file exists if .tf file or ibm_catalog.json is detected in root directory
count=$(find . -type f \( -name "*.tf" -o -name "ibm_catalog.json" \) | grep -vc "^./common-dev-assets/")
if [ "$count" != 0 ]; then
if [[ ! -f "LICENSE" ]]; then
echo "Required LICENSE file is missing. Please add it and try again."
Expand Down