Skip to content

Commit

Permalink
Improve deploy script
Browse files Browse the repository at this point in the history
Added the git branch and latest hash to the prompt
  • Loading branch information
jits committed Feb 6, 2024
1 parent 5ba6e7c commit cb31b65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deploy
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ set -eu -o pipefail
bold=$(tput bold)
normal=$(tput sgr0)

current_branch=$(git branch --show-current)
current_hash=$(git rev-parse --short HEAD)

echo
printf "%sThis will deploy the current code on this machine to the live environment on Firebase%s" "$bold" "$normal"
printf "%sThis will deploy the current code on this machine (branch: %s, hash: %s) to the live environment on Firebase%s" "$bold" "$current_branch" "$current_hash" "$normal"
echo
read -r -p "Continue? [y/N] " -n 1
if [[ "$REPLY" =~ ^[Yy]$ ]]; then
Expand Down

0 comments on commit cb31b65

Please sign in to comment.