You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having some issues figuring out how to publish Lerna in independent mode through a CI.
I want to:
update NPM versions independently locally
have CI do NPM publish
I can do 1. with lerna publish --skip-npm. But how do I do 2. ?
I checked the source code of publish and it seems to me an option is missing. Something like --current to publish all tags attached to the last commit.
Or am I missing something. Your feedback would be greatly appreciated.
It's a bit surprising such a manual effort is needed to deploy independent packages through a CI. Any plans to make anything like the script above available as lerna command?
I suppose I'm left wondering why you would want to split these decisions? If you're just trying to gate a release on tests passing, that should be a prepublish lifecycle (or other agreed-upon process).
We definitely want to support automated publishing in CI (something like semantic-release), but I don't think we can safely support this split-decision approach in our current codebase.
I can see an argument for improving lerna updated or lerna ls to support better filtering and perhaps even a --since=<commit-ish> flag that would make scripts like yours far easier.
Oh, I sympathize! I'm probably going to be in a similar situation at work Real Soon Now™️, so it's not completely hopeless.
However, we've got a (growing) complexity problem with the codebase, and I'm trying to keep the stuff that can be an external script externalized for now. My dream is to make various parts of lerna pluggable, so we can simplify a bit of the core code and have cleaner integrations with special cases like yours.
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.
Activity
noherczeg commentedon Mar 8, 2017
Have you considered using https://github.com/lerna/lerna#exec with manual git push on your CI?
moeriki commentedon Mar 16, 2017
I have tried some things and settled with this script.
package.json
{ "scripts": { "deploy": "node deploy.js" } }deploy.js
It's a bit surprising such a manual effort is needed to deploy independent packages through a CI. Any plans to make anything like the script above available as lerna command?
evocateur commentedon Mar 16, 2017
I suppose I'm left wondering why you would want to split these decisions? If you're just trying to gate a release on tests passing, that should be a
prepublishlifecycle (or other agreed-upon process).We definitely want to support automated publishing in CI (something like semantic-release), but I don't think we can safely support this split-decision approach in our current codebase.
I can see an argument for improving
lerna updatedorlerna lsto support better filtering and perhaps even a--since=<commit-ish>flag that would make scripts like yours far easier.moeriki commentedon Mar 16, 2017
No good reason. Just company policy 😖
evocateur commentedon Mar 16, 2017
Oh, I sympathize! I'm probably going to be in a similar situation at work Real Soon Now™️, so it's not completely hopeless.
However, we've got a (growing) complexity problem with the codebase, and I'm trying to keep the stuff that can be an external script externalized for now. My dream is to make various parts of
lernapluggable, so we can simplify a bit of the core code and have cleaner integrations with special cases like yours.moeriki commentedon Mar 16, 2017
No problem. I'm good as-is.
joebowbeer commentedon May 10, 2018
Can step 2 be accomplished using
--skip-git, possibly in combination with--force-publish?lerna publish --skip-gitGiven the usual sequence of operations to publish an npm package:
I am hoping that lerna provides a way to separate the first two from the last.
Is this what
--no-npmand--no-gitare designed for?lock commentedon Dec 27, 2018
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.