question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`lerna publish` doesn't publish due to no change since last release in CI

See original GitHub issue

Hello,

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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
alexjsdevcommented, Nov 19, 2019

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 the lerna publish command, but i thought it was not an option since it’s in the docs (and CL help info) only for lerna version… i think i now understand that lerna publish, runs lerna version as part of what it does… guess i was holding it wrong.

2reactions
evocateurcommented, Feb 1, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found