Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lerna used in non conventional commit workflow not supported when manually selecting prerelease version and bump to release in CI #2219

Open
aarym opened this issue Aug 9, 2019 · 1 comment

Comments

@aarym
Copy link

commented Aug 9, 2019

In a Developer / Release workflow, where a developer manually selects the prelease version using lerna version, and the CI process automatically publishes the prerelease version to release version when merging to master.

See below steps for full workflow. It would be good if lerna version could work better with lerna publish and see the prerelease is from git and to enable publish to npm with the release version without having to go and manually do this in lerna version for a new commit.

Expected Behavior

Step 7. ci triggers build and publish to npm feed without the preid (when the version is non prerelease)

Current Behavior

  1. developer creates branch from master & commits change to local git
  2. developer runs lerna version prerelease
  3. developer commits & pushes to origin
  4. ci triggers build and publish to our npm feed lerna publish from-git --yes
  5. npm feed now has pre release version
  6. developer merges branch to master
  7. ci triggers build and publish to npm feed but doesn't recognise any changes

Possible Solution

The issue here is, we're wanting developers to think about the version. We could go down the conventional commit path for this & considering this. But right now once prerelease is done, we want to run publish command in ci for the release version & not have to make any changes in the repo to force this through another version selection (no prerelease).

Another option I looked at without conventional commits is to use

  1. lerna publish --canary
  2. lerna publish --yes

But in CI situation I want the lerna pubish --yes to publish the canary release without the preid, i.e. canary is 1.0.1-alpha.0 and once in master to be 1.0.1

Steps to Reproduce (for bugs)

lerna.json

<!-- Please paste your `lerna.json` here -->

lerna-debug.log

<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->

Context

As above this seems like a workflow limitation for a common developer release process.

Your Environment

Executable Version
lerna --version v3.13.1
npm --version 6.4.1
yarn --version n/a
node --version v10.13.0

| OS | Version |
| Windows 10 | 1607 |
-->

@aarym aarym changed the title Lerna CI non conventional commit workflow not supported Lerna used in non conventional commit workflow not supported when manually selecting prerelease version and bump to release in CI Aug 9, 2019

@aarym

This comment has been minimized.

Copy link
Author

commented Aug 12, 2019

@evocateur wondering if I can gain your expertise in this one? If valid use case around managing packages through git/tags with version prerelease and enabling bumping to release like publish canary then happy to perhaps work on this one to contribute to this great library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.