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

Get wrong latest tag if we have different-rule tag #28

Open
Innei opened this issue Jul 7, 2022 · 2 comments
Open

Get wrong latest tag if we have different-rule tag #28

Innei opened this issue Jul 7, 2022 · 2 comments

Comments

@Innei
Copy link
Contributor

Innei commented Jul 7, 2022

Hi, I have a project and have lots of tags. Not all of the tags is starts with v. E.g.

page_v3.19.1
v3.19.2
page_v3.19.2
v3.19.3
page_v3.19.3
v3.19.4
page_v3.19.4
v3.19.5
page_v3.19.5
v3.19.6
page_v3.19.6
v3.19.7
page_v3.19.7
v3.20.0
page_v3.20.0
v3.20.1
page_v3.20.1
v3.21.0
page_v3.21.0

The prefix with page_v is have nothing to do with v, I want to compare prefixes with v, not page_v. But I found the code, It always gets the latest tag and did not do anything to filter and compares newer tag.

export async function getLastGitTag(delta = 0) {

@antfu
Copy link
Owner

antfu commented Jul 7, 2022

Do you have any solutions in mind?

@Innei
Copy link
Contributor Author

Innei commented Jul 7, 2022

Maybe provide an argument such as --prefix-with= and its default value to be v, then get all of the sorted git tags and do some filter?

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

2 participants