Skip to content

Commit

Permalink
Release script tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Jan 10, 2025
1 parent 38f676f commit 5ff5dd6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
#!/usr/bin/env bash

# Exit on error from any of the linting sub-tasks.
set -e

RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'

if [ ! -z "${GITHUB_TOKEN}" ]; then
if [ -z "${GITHUB_TOKEN}" ]; then
echo -e "${RED}WARNING!${NC} ${RED}WARNING!${NC} ${RED}WARNING!${NC}"
echo -e "Variable ${GREEN}GITHUB_TOKEN${NC} is not set."
echo "Do you wish to continue with the release?"
# Prompt the user to continue the release or not.
read -p "You will need to manually create a GitHub release if you continue. [y/n]" release_prompt
fi

# Set default of release_prompt value to no.
release_prompt="${release_prompt:-n}"
# Set default of release_prompt value to no.
release_prompt="${release_prompt:-n}"
fi

if [ "$release_prompt" = "n" ] || [ "$release_prompt" = "N" ]; then
echo -e "${RED}Release aborted${RED}"
exit
fi

echo -e "${GREEN}Continuing release…${RED}"

echo -e "${GREEN}Release started…${RED}"
echo -e "${GREEN}Checking linting and building…${RED}"
yarn lint
yarn build
Expand Down

0 comments on commit 5ff5dd6

Please sign in to comment.