Skip to content

Commit

Permalink
Modified rename-project.bash to check if the circleci/config.yml exis…
Browse files Browse the repository at this point in the history
…ts before attempting to edit it.
  • Loading branch information
mtac50 authored Nov 18, 2024
1 parent 5d7397a commit 02752d9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions rename-project.bash
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,19 @@ sed -i -z -E \
mv "src/main/$BASE/$PACKAGE_NAME/HmppsTemplateKotlin.kt" "src/main/$BASE/$PACKAGE_NAME/$CLASS_NAME.kt"
mv "src/main/$BASE/$PACKAGE_NAME/config/HmppsTemplateKotlinExceptionHandler.kt" "src/main/$BASE/$PACKAGE_NAME/config/${CLASS_NAME}ExceptionHandler.kt"

# TEMPORARILY REMOVED - THIS WILL NEED TO BE DONE MANUALLY FOR GHA PROJECTS
# change cron job to be random time otherwise we hit rate limiting with veracode
RANDOM_HOUR=$((RANDOM % (9 - 3 + 1) + 3))
RANDOM_MINUTE=$(($RANDOM%60))
RANDOM_MINUTE2=$(($RANDOM%60))
sed -i -z -E \
-e "s/SLACK_RELEASES_CHANNEL/$SLACK_RELEASES_CHANNEL/" \
.circleci/config.yml

if [ -f .circleci/config.yml ]; then
sed -i -z -E \
-e "s/SLACK_RELEASES_CHANNEL/$SLACK_RELEASES_CHANNEL/" \
.circleci/config.yml
else
echo "File .circleci/config.yml does not exist. Skipping CircleCI notifications configuration as this is a GHA project."
fi

echo "NEEDS TO BE SET MANUALLY"
echo "========================"
Expand Down

0 comments on commit 02752d9

Please sign in to comment.