Repository navigation
Publish as a dev/canary release - #65
Conversation
0038b56 to
8b6020c
Compare
|
Ok got it to successfully publish only the commits related to a merge. |
| if (hasTags) { | ||
| if (flags.canary) { | ||
| var lastSHA = getLastSHA(); | ||
| commits = lastSHA.slice(0, 8) + "^.." + lastSHA.slice(0, 8); |
There was a problem hiding this comment.
Can you pull this into it's own descriptive function?
b0554ae to
17173e4
Compare
…ncies - When a package is updated, find all packages that dependent on it and update the package.json even if the package was not updated itself
3708dd4 to
828d39f
Compare
| if (flags.canary) { | ||
| console.log("Reseting git state"); | ||
| // reset since the package.json files are changed | ||
| execSync("git checkout -- */package.json"); |
There was a problem hiding this comment.
Just to be more specific can this be packages/*/package.json?
| @@ -0,0 +1,5 @@ | |||
| var execSync = require("./execSync"); | |||
|
|
|||
| module.exports = function getCurrentSHA() { | |||
There was a problem hiding this comment.
Want to put this in gitUtils?
|
|
||
| if (hasTags) { | ||
| if (flags.canary) { | ||
| var currentSHA = gitUtils.getCurrentSHA(); |
There was a problem hiding this comment.
Instead of the getCurrentSHA, we could change this to be a default and either prompt the user or even better just use a passed in sha from the flag (flag.canary). Would be cool to support just passing in a PR number too
| npmUtils.addDistTag(pkg.name, versions[pkg.name], process.env.NPM_DIST_TAG); | ||
| } else if (flags.canary) { | ||
| logger.log("info", "Adding canary npm dist-tag"); | ||
| npmUtils.addDistTag(pkg.name, pkg.pkg.version, "canary"); |
There was a problem hiding this comment.
Fixed since versions[pkg.name] wasn't working
If pkg.pkg.version has already been set, we can just use that everywhere instead of versions[pkg.name] right? In this case, the cross dependent versions are undefined (unless we should modify that instead)
There was a problem hiding this comment.
Are we actually updating the version in pkg.pkg.version or are we just updating the file?
There was a problem hiding this comment.
in updateChangedPackages we used to only change the updated packages.
I changed it to run on all packages, and then set the version in pkg.pkg.version = version; at the end we rewrite the package.json
|
I did find you that you can do http://semver.npmjs.com/ |
|
@hzoo @thejameskyle I'm pretty new versioning packages using The question is, does it make sense to keep Feel free to remove the comment if make noise. Thanks! |
|
@Dendril want to create a separate issue for that? |
Publish as a dev/canary release
|
Done #77. Thanks! |
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |


Testing in https://github.com/hzoo/hzoo-npm-publish.
Right now I don't know how to make this automatically run in travis since you can't just do
npm publishand have to use their deploy feature (I think)I just ran it locally (or we can set this up on our instance so that it listens for a merge and then will run
./node_modules/.bin/lerna publish --canary.We can change the name/implementation; just testing.
checkUpdatedPackagesdoes a git diff on the last tag (but I'm not creating a tag here, so either we do need to create a git tag or we figure out how to make sure we don't publish all packages unless that is necessary for this feature to work) - we could check the commits related to the merge PR and git diff that only.