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
fix: Fix deploy script so that it always publishes a production build. #1105
Conversation
Version `2.2.0` is broken because it's a development build.
.travis.yml
Outdated
@@ -22,6 +22,9 @@ script: | |||
|
|||
## lint the github PR title. | |||
- npm run travis-pr-title-lint | |||
## In case Travis is building a release tag, make sure we have a production build | |||
## before publishing to npm | |||
- NODE_ENV=production npm run build |
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 guess that we can use something like:
before_deploy:
- NODE_ENV=production npm run build
to run it only when we are release a new version on a tag build (https://docs.travis-ci.com/user/deployment/npm/#Running-commands-before-and-after-deploy)
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.
oh nice! I didn't know about that hook.
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.
That will keep the build running fast when we aren't doing a deploy
Fixes #1104
I think this will work but we'll have to cut a bug fix release to fully test it. If this works I'll file an issue to follow-up with some better safety checks so it doesn't happen again.