Skip to content

Commit

Permalink
chore: display filepath due to extra confirmation msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Nov 6, 2024
1 parent bca5cdc commit 4c15bb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# release
RELEASE_SUCCESSFUL_TEXT=https://github.com/Purpose-Green/release/releases
RELEASE_EXTRA_CONFIRMATION='{"src/dev":"are you sure you want to change the files in this dir?", "migrations": "and this one?"}'
RELEASE_EXTRA_CONFIRMATION='{"src/dev":"Are you sure sure?"}'

# slack
SLACK_CHANNEL_ID=
Expand Down
3 changes: 2 additions & 1 deletion src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function main::extra_confirmation_texts() {
return 0
fi

local confirmation_msg
local confirmation_msg filepath
while IFS= read -r filepath; do
confirmation_msg=$(json::parse_text "$RELEASE_EXTRA_CONFIRMATION" "$filepath")
if [[ -n "$confirmation_msg" ]]; then
Expand All @@ -69,6 +69,7 @@ function main::extra_confirmation_texts() {
done <<< "$changed_files"

if [[ -n "$confirmation_msg" ]]; then
echo "Psst, due to '$filepath'..."
# shellcheck disable=SC2116
local question="$(echo "${COLOR_RED}$confirmation_msg${COLOR_RESET}")"
io::confirm_or_exit "$question"
Expand Down

0 comments on commit 4c15bb6

Please sign in to comment.