`lerna publish` doesn't publish due to no change since last release in CI
See original GitHub issueHello,
I am trying to publish packages in travis CI for my project, along with other deployment processes. For my setup, I create a tag with a new version for the project and the deployments are triggered on every new tag. I want to publish the packages for that tag in the CI.
I use lerna publish from-git --force-publish=* --no-git-tag-version --no-push --yes
to publish but it doesn’t work, saying that there are no changes to publish.
Is there something I am missing, or is it not possible to achieve this with lerna?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Lerna always lists all packages ready to publish when running ...
the step which I run lerna updated in my github actions workflow always tells/lists me all the package are available to publish which...
Read more >@lerna/version - npm
This command works regardless of whether the current HEAD has been released, similar to --force-publish , except that any non-prerelease ...
Read more >Troubleshooting | Lerna
Make sure to commit all the changes you have in your lerna project, before importing any packages using lerna import . Publish Command....
Read more >JavaScript Monorepos with Lerna - Semaphore CI
Lerna detects by itself which packages have changed since the last release and publishes only the new versions. But this feature only works...
Read more >@lerna/publish | Yarn - Package Manager
command: GitUtilities.isInitialized no longer exists. You shouldn't be using GitUtilities. publish: Many named exports of GitUtilities are no longer provided.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
so i have a question that i can’t seem to find the answer too… I changed the root babel config that is used by all the packages in my lerna monorepo, how do i get lerna to republish (which is when it will re-transpile) all the packages so they will be using my latest babel config? Since my babel config is outside of the
packages/
directory, lerna is saying there are no changes to publish…Edit: i’m an idiot…
--force-publish=*
is all i needed to pass to thelerna publish
command, but i thought it was not an option since it’s in the docs (and CL help info) only forlerna version
… i think i now understand thatlerna publish
, runslerna version
as part of what it does… guess i was holding it wrong.collect-updates is where the rubber hits the road. But in general terms, once we’ve identified the subpaths where packages live, we just loop through them and run
git diff --name-only ${PREVIOUS_TAG} -- packages/${PACKAGE}
and if there are changes that aren’t ignored we add them to the list of packages to operate on.Deceptively simple.