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

Graduating a prerelease with no further changes #1675

Open
MartinBlackburn opened this Issue Sep 13, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@MartinBlackburn

MartinBlackburn commented Sep 13, 2018

When we're happy with our latest prerelease we'd like to graduate the packages even if no further changes were made.
We thought this would be fixed in issue #1671, but we now get a new problem where lerna wont release an already released commit.

Expected Behavior

Version is updated from 0.0.1-prelease.0 to 0.0.1

Current Behavior

lerna publish --force-publish=lobby --yes --conventional-commits --no-verify-registry --no-verify-access
lerna notice cli v3.3.2
lerna info versioning independent
lerna info Looking for changed packages since lobby@0.0.1-prerelease.0
lerna WARN force-publish lobby
lerna ERR! ERELEASED The current commit has already been released. Please make new commits before continuing.

Steps to Reproduce (for bugs)

  1. git commit -m'chore: example change'
  2. lerna version prerelease --force-publish=lobby --yes --preid=prerelease --npm-tag=prerelease => 0.0.1-prerelease.0
  3. lerna version --force-publish=lobby --yes --conventional-commits => would like 0.0.1 got The current commit has already been released
lerna.json

{
  "packages": [
    "packages/*",
    "apps/*"
  ],
  "command": {
    "publish": {
      "conventionalCommits": true,
      "message": "chore(release): publish",
      "allowBranch": "release/build"
    }
  },
  "npmClient": "yarn",
  "useWorkspaces": true,
  "version": "independent"
}

Context

We prerelease packages on every merge to our release branch. After testing we will manually take the decision to graduate these packages.

Your Environment

Executable Version
lerna --version 3.3.2
npm --version 6.4.1
yarn --version 1.9.4
node --version v8.11.1
OS Version
macOS el Capitan 10.11.6
@MartinBlackburn

This comment has been minimized.

Show comment
Hide comment
@MartinBlackburn

MartinBlackburn Sep 18, 2018

The current workaround I am using for this is to make an "empty" commit to the branch, such as whitespace change, then run learna publish
It does mean we are polluting the git history, but for now, it works.

MartinBlackburn commented Sep 18, 2018

The current workaround I am using for this is to make an "empty" commit to the branch, such as whitespace change, then run learna publish
It does mean we are polluting the git history, but for now, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment