Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
chore: add error fallbacks for release script
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed May 9, 2021
1 parent 49a6dba commit ec929a1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ GREEN_COLOR="\033[0;32m"
RESET_COLOR="\u001b[39m"
SPACER=" "

printf "${YELLOW_COLOR}Checking for errors...${RESET_COLOR}"
printf "${YELLOW_COLOR}⚠ Checking for errors...${RESET_COLOR}"
npx --no-install lint-staged --quiet || exit 1
printf "\r${GREEN_COLOR}No errors found. Commiting your changes!${RESET_COLOR}${SPACER}\n"
printf "\r${GREEN_COLOR}βœ“ No errors found. Committing your changes!${RESET_COLOR}${SPACER}\n"
14 changes: 8 additions & 6 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/sh
YELLOW_COLOR="\u001b[33m"
GREEN_COLOR="\033[0;32m"
RED_COLOR='\033[0;31m'
BLUE_COLOR='\033[0;34m'
RESET_COLOR="\u001b[39m"
SPACER=" "

printf "${YELLOW_COLOR}Checking for errors...${RESET_COLOR}"
source scripts/check.sh &>/dev/null || exit 1
printf "\r${GREEN_COLOR}No errors found.${RESET_COLOR}${SPACER}\n"
printf "${YELLOW_COLOR}Building distribution bundles...${RESET_COLOR}"
source scripts/build.sh &>/dev/null || exit 1
printf "\r${GREEN_COLOR}Built distribution bundles.${SPACER}${RESET_COLOR}\n${YELLOW_COLOR}Run \`np\` to publish.${RESET_COLOR}"
printf "${YELLOW_COLOR}⚠ Checking for errors...${RESET_COLOR}"
source scripts/check.sh &>/dev/null || (printf "\r${RED_COLOR}βœ— Error during checks. Run \`sh scripts/check.sh\`.${RESET_COLOR}\n" && exit 1)
printf "\r${GREEN_COLOR}βœ“ No errors found.${RESET_COLOR}${SPACER}\n"
printf "${YELLOW_COLOR}⚠ Building distribution bundles...${RESET_COLOR}"
source scripts/build.sh &>/dev/null || (printf "\r${RED_COLOR}βœ— Error during build. Run \`sh scripts/build.sh\`.${RESET_COLOR}\n" && exit 1)
printf "\r${GREEN_COLOR}βœ“ Built distribution bundles.${SPACER}${RESET_COLOR}\n${BLUE_COLOR}β“˜ Run \`np\` to publish.${RESET_COLOR}\n"
4 changes: 2 additions & 2 deletions scripts/yarn.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh
YELLOW_COLOR="\u001b[33m"
RED_COLOR='\033[0;31m'
RESET_COLOR="\u001b[39m"

if [[ $npm_execpath != *"yarn"* ]]; then
printf "${YELLOW_COLOR}This repository requires Yarn 1.x for scripts to work properly.${RESET_COLOR}\n\n"
printf "${RED_COLOR}βœ— Lucia requires Yarn 1.x for scripts to work properly.${RESET_COLOR}\n\n"
exit 1
fi
2 changes: 2 additions & 0 deletions src/core/utils/__test__/adjustDeps.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import adjustDeps from '../adjustDeps';

describe('.adjustDeps', () => {
Expand Down

0 comments on commit ec929a1

Please # to comment.