-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run checks for any push to changeset-relrease/prerelease branch
no harm in not uninstalling yarn add back pretty-quick (how we missed you)
- Loading branch information
Showing
3 changed files
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- changeset-release/prerelease/* | ||
pull_request: | ||
branches: | ||
- main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
#!/usr/bin/env bash | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# pretty-quick --staged --pattern '**/*.+(ts|js)' | ||
yarn pretty-quick --staged --pattern '**/*.+(ts|js)' | ||
|
||
branch="$(git rev-parse --abbrev-ref HEAD)" | ||
if [[ $branch == prerelease* ]]; then | ||
BRANCH="$(git rev-parse --abbrev-ref HEAD)" | ||
|
||
# Ensure that its not possible to commit to a prerelease branch without a pre.json file | ||
if [[ $BRANCH == prerelease* ]]; then | ||
echo "checking for pre.json" | ||
PRE_JSON=.changeset/pre.json | ||
if test -f "$PRE_JSON"; then | ||
echo "$PRE_JSON exists." | ||
PRE_FILE=.changeset/pre.json | ||
if test -f "$PRE_FILE"; then | ||
echo "$PRE_FILE exists." | ||
else | ||
echo "$PRE_JSON does not exist. Run yarn beta-enter to create it." | ||
echo "$PRE_FILE does not exist. Run yarn beta-enter to create it." | ||
exit 1 | ||
fi | ||
fi |