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

feat(version): add --force-git-tag option #2594

Merged
merged 4 commits into from May 24, 2020

Conversation

jzempel
Copy link
Contributor

@jzempel jzempel commented May 21, 2020

Description

Adds a new version --force-git-tag option which ensures any existing tag will be replaced rather than failing with an error.

Motivation and Context

Currently GitHub does not offer tag protection (isaacs/github#1091) meaning anyone with repo write access can add tags. We can purge these unwanted tags, but it is very easy for them to reappear as soon as someone with write access pushes stale tags back to the repo.

We're experiencing this issue with https://github.com/zendeskgarden/react-components. We want the option for lerna version to "win". The new option provides the means for asserting that the version tag generated by lerna version is, in truth, the desired tagged commit.

How Has This Been Tested?

  • added associated unit test
  • ./core/lerna/cli.js version -h execution lists the new argument

Screen Shot 2020-05-21 at 2 36 01 PM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@evocateur evocateur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm leery of using any flag with "force" in its name, but I guess this doesn't hurt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants