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

custom tag_format not used to parse existing tags in latest-tag command #34

Open
matthewbpt opened this issue Mar 16, 2020 · 3 comments

Comments

@matthewbpt
Copy link

On our repository we've been using the format release-%major%.%minor%.%patch% for our releases. I tried to introduce your action so we could auto tag and release instead of our current manual process, but it doesn't work correctly with our format, eg always creates tag release-0.1.0 for a minor release, despite us already having many tags above that.

I had a look at the code and it seems this logic is missing here https://github.com/K-Phoen/semver-release-action/blob/master/internal/pkg/git/git.go but I'm not so familiar with Go myself to attempt a fix and PR myself.

@shadycuz
Copy link

@matthewbpt I'm about to try a similar workflow and found your issue and was a bit worried. I read through the code and I do think it will work fine.

The problem you are having is that your tags do not meet the semver specifications. The problem is that you shouldn't have anything in front of the semver string. The function this action uses to parse the tags is documented here. You can see it can handle a "v" and extra leading "0" like 01.2.5 but not much else.

What I would recommend is for your release tag stick to just v{major}.{minor}.{patch} and for anything else v{major}.{minor}.{patch}-{EXTRA-Stuff}.

@krogon
Copy link

krogon commented Jun 24, 2024

similar to: #43

@krogon
Copy link

krogon commented Jun 25, 2024

Respecting tag_format fix is available on my fork (v2.3.0 version).

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

No branches or pull requests

3 participants