-
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
Conversation
Add prerelease for standard-version
@@ -0,0 +1,17 @@ | |||
#!/usr/bin/env bash |
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
#!/usr/bin/env bash | ||
|
||
npm install | ||
npm test |
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.
Please remove npm test from this. Let that be in pre release only
fi | ||
|
||
unset BRANCH | ||
git push --follow-tags origin |
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.
Mention which branch you push to
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.
And please put this file in /bin
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.
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.
Skip changelog when not in master Add -e flash to bash Move commands to run tests out of script
@@ -0,0 +1,15 @@ | |||
#!/bin/bash -e |
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.
generally, use #!/usr/bin/env sh
and set -o nounset -o pipefail -o errexit
. And prefer not to use bash specific syntax in the scripts. I don't see any bash specific syntax, so thats good. Why sh
and not bash
, cuz bash is not guaranteed to always be there. sh
represents whatever is the default shell for the user running the script. I prefer the explicit set
commands as opposed to the -e
commandline option for bash.
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.
Not a blocker, just mentioning it.
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.
Okay, will read on this and update the script.
#58