Skip to content

Commit 26df282

Browse files
committed
chore(boil): Add dependency checks to release script
1 parent a92b4bc commit 26df282

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.scripts/release_boil.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,31 @@ CLEANED_BUMPED_VERSION=${BUMPED_VERSION#boil-}
88

99
RELEASE_BRANCH="chore/boil-release-$CLEANED_BUMPED_VERSION"
1010

11-
# echo "Checking if working directory is clean"
11+
echo "Checking if working directory is clean"
1212
if ! git diff-index --quiet HEAD --; then
1313
echo "Working directory is dirty, aborting" >&2
1414
exit 1
1515
fi
1616

17+
# Prompt the user to confirm their Git identity used to create the commit
18+
GIT_EMAIL=$(git config --includes --get user.email)
19+
GIT_USER=$(git config --includes --get user.name)
20+
21+
echo "The following Git user will be used: $GIT_USER <$GIT_EMAIL>"
22+
echo "Is this correct (Y/n)?"
23+
read -r RESPONSE
24+
25+
if [[ "$RESPONSE" == "y" || "$RESPONSE" == "Y" || -z "$RESPONSE" ]]; then
26+
echo "Proceeding with $GIT_USER <$GIT_EMAIL>"
27+
else
28+
>&2 echo "User not accepted. Exiting."
29+
exit 1
30+
fi
31+
32+
# Check dependencies
33+
gh auth status
34+
git-cliff --version
35+
1736
# Switch to main branch after we validated that the working directory is clean
1837
git switch main
1938

0 commit comments

Comments
 (0)