Allow publishing with uncommitted changes in working tree
See original GitHub issueThis might be a feature request, but I’m no longer able to use Lerna in react-cosmos since this check has been introduced.
$ lerna publish --no-git-tag-version --no-push --npm-tag=next lerna notice cli v3.1.1 lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove changes before continuing.
Here are the publishing steps I follow:
- Context: In our monorepo all packages point to
srcby default - Before publishing, a custom script builds all packages and changes entry points to
dist - Publish to npm via Lerna --no-git-tag-version --no-push (with uncommitted changes) — Except this doesn’t work anymore
- Run custom script to point packages to
srcagain (clean working tree) - Git commit and push via Lerna version
Is there a way to keep maintaining this flow with the latest API (v3.1.1.)? Maybe an option to skip the clean working tree check?
Feel free to propose alternative workflows that meet this criteria: Code published slightly differs from code pushed to git repo (ie. code published points to dist while code versioned points to src).
PS: I appreciate all the work you’ve put into making v3 solid!
Is there any blog post or changelog entry where I can read about all the changes from v2 to v3, to understand the migration better?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (4 by maintainers)
Top Related StackOverflow Question
This little known feature of git did the trick for us:
git update-index --assume-unchanged .npmrcThis 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.