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

CLI default options now removing tag prefixes #44

Closed
deimyts opened this issue May 31, 2017 · 5 comments
Closed

CLI default options now removing tag prefixes #44

deimyts opened this issue May 31, 2017 · 5 comments
Assignees

Comments

@deimyts
Copy link

deimyts commented May 31, 2017

I'm using a v prefix for my version tags (v1.0.0), and
I'm using conventional-github-releaser from the CLI.

After tagging the repo, I run the following commands:
git push --follow-tags origin master
conventional-github-releaser -t $GITHUB_TOKEN -p angular

If my tag is v1.0.1, instead of creating the release on that tag, conventional-github-releaser is adding a new tag to my remote repo, without the prefix: 1.0.1. It then attaches the release to that tag, instead of the one that I actually pushed. It doesn't delete the prefix tag, it just fails to use it.

This behavior started sometime between 1.1.3 and 1.1.9

@egoldblum
Copy link

egoldblum commented Jun 1, 2017

I have the exact same workflow and the exact same issue.

It appears that this project's own releases also went from having a v prefix to not having one between v1.1.7 and 1.1.8.

https://github.com/conventional-changelog/conventional-github-releaser/releases

@fergiemcdowall
Copy link

+1

@fergiemcdowall
Copy link

Can confirm: works as expected on 1.1.3. On all subsequent versions, "v"-prefixes are mysteriously stripped away.

@hutson hutson added the defect label Jun 1, 2017
@hutson
Copy link
Contributor

hutson commented Jun 1, 2017

I'm pretty sure the missing v is a result of this change.

That change switched to using find-versions, which strips the leading v.

I'll continue looking into the issue later, but in the meantime does anyone have any suggestion for a package that can extract semantic valid versions, while keeping the leading v in place?

@hutson hutson closed this as completed in 1b6a68c Jun 2, 2017
@hutson hutson self-assigned this Jun 2, 2017
@hutson
Copy link
Contributor

hutson commented Jun 2, 2017

I've published version v1.1.10 which contains a fix to the transform function.

The transform function will no longer remove the leading v in a tag.

Full details available in the commit message - 1b6a68c

I've also added additional unit tests to check for the desired behavior and prevent future regression.

In closing, I'm really sorry for the bug I introduced, and I hope y'all will continue to use conventional-github-releaser, and get value from it.

hutson added a commit that referenced this issue Mar 19, 2018
Don't remove the leading `v` from a git tag found to be a semantically
valid version tag.

Previous behavior was based on a third-party package that removed the
leading `v` in front of a semantically valid version tag.

Though the behavior was correct for that package, we need to preserve
the leading `v` for the purpose of publishing.

If the tag has a leading `v`, perhaps because the user has specifically
tagged their repository using a leading `v`, they likely expect that `v`
to be used as the tag on GitHub, and as the name of the GitHub release
page associated with that tag.

Therefore we must preserve the leading `v` in all semantically valid
version tags.

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

No branches or pull requests

4 participants