-
Notifications
You must be signed in to change notification settings - Fork 8
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
Pull latest git tag before assuming that the package.json is correct #37
Comments
Hi Nick, Do you set the version to empty when I just wonder what happens when corp-sem-release tries to bump the version and value in package.json is empty. Could you explain the consequences if you don't run your By the way the For first time ever, corp-sem-release, bumpUpVersion.js will literally run |
So I actually have it so that the built code is deployed to NPM and the Latest branch (instead of master). This means that the version isn't located on the master branch. Instead the version on the master branch is 0.0.0-semantically-released.0. When I don't recall if |
Ok just for clarity, if I run
@nick-woodward Do you release from a branch or master? We have been using for months and we always release from master. It has been working for new and old projects. Maybe there is a genuine use case that Looking at the code those days, I have small concerns regarding to the latest version being retrieved from git tags but the bump being trusted to the command One way I can see if always use the git tag as source of true. If so, corp-sem-release should always run cheers |
Our source code is located in master, we end up releasing from a latest branch though that way we don't pollute master with build artifacts. This is currently how we're handling our releases: (the above example was slimmed down for simplicity) #!/bin/sh
git checkout latest
git reset --hard origin/latest
git merge -X theirs origin/master
npm run semantic-release
git push origin latest --tags package.json {
// ...
"scripts": {
// ...
"semantic-release:pre": "npm run build && git add .",
"semantic-release": "node scripts/semantic-release-pre.js && corp-semantic-release --pre-commit semantic-release:pre -r 0 -b latest --changelogpreset angular-bitbucket && npm publish",
// ..
},
// ... |
Description
semantic-release
pulls the latest npm version before assuming there isn't a published version.Meanwhile,
corp-semantic-release
takes the version in the package.json at face-value.Workaround
package.json
scripts/semantic-release-pre.js
Resources
The text was updated successfully, but these errors were encountered: