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

Ignore v in --repo-version #1483

Closed
HsuTing opened this issue Jun 25, 2018 · 3 comments
Closed

Ignore v in --repo-version #1483

HsuTing opened this issue Jun 25, 2018 · 3 comments

Comments

@HsuTing
Copy link

@HsuTing HsuTing commented Jun 25, 2018

I want to publish with circleci and git tag. Normally I use git tag like v1.0.0, and publish in circleci like yarn lerna publish --repo-version ${CIRCLE_TAG}. As a result, yarn lerna publish will use v1.0.0 to publish packages, but --new-version of yarn publish can not be a version with v. Maybe v should be ignored with --repo-version?

Expected Behavior

yarn publish --repo-version v1.0.0
// publish packages with version `1.0.0`.

Current Behavior

yarn publish --repo-version v1.0.0
// publish packages with version `v1.0.0`.

Possible Solution

Add repoVersion.replace(/^v/, '') in here.

Steps to Reproduce (for bugs)

yarn lerna publish --repo-version v1.0.0
lerna.json

<!-- Please paste your `lerna.json` here -->
{
  version: 1.0.0,
  commands: { 
    publish: { 
      ignore: [ 
        *.md,
        __tests__/**
      ]
    }
  },
  lerna: 2.11.0,
  npmClient: yarn,
  npmClientArgs: [ 
    --no-lockfile
  ],
  packages: [ 
    packages/*
  ]
}

lerna-debug.log

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

Context

I hope this can publish in circleci with my git tag, and I want to still have v in my git tag. Like standard-version, this will ignore v when I use --release-as. Maybe lerna can ignore, too.

Your Environment

Executable Version
lerna --version 2.11.0
npm --version 6.1.0
yarn --version 1.7.0
node --version 10.2.1
OS Version
macOS High Sierra 10.13.5
evocateur added a commit that referenced this issue Jul 13, 2018
This removes any preceding "v" or "=", as well as any trailing build metadata.

Refs #1483
@evocateur
Copy link
Member

@evocateur evocateur commented Jul 13, 2018

This has been fixed in master, but is unlikely to make it into the 2.x release line as the codebase has changed dramatically.

@HsuTing
Copy link
Author

@HsuTing HsuTing commented Jul 14, 2018

@evocateur OK! Thank you 😁

evocateur added a commit that referenced this issue Jul 27, 2018
BREAKING CHANGE:
* `--preid` now defaults to "alpha" during prereleases:

  The previous default for this option was undefined, which led to an awkward "1.0.1-0" result when passed to `semver.inc()`.

  The new default "alpha" yields a much more useful "1.0.1-alpha.0" result. Any previous prerelease ID will be preserved, just as it was before.

* `--no-verify` is no longer passed to `git commit` by default, but controlled by the new `--commit-hooks` option:

  The previous behavior was too overzealous, and the new option operates exactly like the corresponding [npm version](https://docs.npmjs.com/cli/version#commit-hooks) option of the same name.

  As long as your pre-commit hooks are properly scoped to ignore changes in package.json files, this change should not affect you. If that is not the case, you may pass `--no-commit-hooks` to restore the previous behavior.

Fixes #277
Fixes #936
Fixes #956
Fixes #961
Fixes #1056
Fixes #1118
Fixes #1385
Fixes #1483
Fixes #1494
nicolo-ribaudo pushed a commit to babel/lerna that referenced this issue Dec 18, 2018
BREAKING CHANGE:
* `--preid` now defaults to "alpha" during prereleases:

  The previous default for this option was undefined, which led to an awkward "1.0.1-0" result when passed to `semver.inc()`.

  The new default "alpha" yields a much more useful "1.0.1-alpha.0" result. Any previous prerelease ID will be preserved, just as it was before.

* `--no-verify` is no longer passed to `git commit` by default, but controlled by the new `--commit-hooks` option:

  The previous behavior was too overzealous, and the new option operates exactly like the corresponding [npm version](https://docs.npmjs.com/cli/version#commit-hooks) option of the same name.

  As long as your pre-commit hooks are properly scoped to ignore changes in package.json files, this change should not affect you. If that is not the case, you may pass `--no-commit-hooks` to restore the previous behavior.

Fixes lerna#277
Fixes lerna#936
Fixes lerna#956
Fixes lerna#961
Fixes lerna#1056
Fixes lerna#1118
Fixes lerna#1385
Fixes lerna#1483
Fixes lerna#1494
@lock
Copy link

@lock lock bot commented Dec 27, 2018

This 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.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants