-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pre-publish script): Add pre-publish shell script to support standard-version prerelease #57
Changes from 10 commits
0d14d0e
6afa479
3237fe5
03929bd
fa94666
05f41cc
f5bb771
bd3518a
9445058
2f2994d
54fdeac
b2b9724
0864935
a0bbc89
59000a9
6485730
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
npm install | ||
npm test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove npm test from this. Let that be in pre release only |
||
git diff --quiet | ||
|
||
BRANCH=$(git branch | grep \* | cut -d ' ' -f2-) | ||
|
||
if [ $BRANCH == 'master' ] | ||
then | ||
npx standard-version | ||
else | ||
npx standard-version --prerelease $BRANCH | ||
fi | ||
|
||
unset BRANCH | ||
git push --follow-tags origin | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mention which branch you push to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And please put this file in /bin There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't want the dev-time scripts to be part of the bundled package. So, we can put it in the bin folder and ensure that these files are not bundled into the tarball. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bash -e to abort on error