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

Fixes #193 - use git describe istead of listing tags #194

Closed

Conversation

krzysiekbielicki
Copy link

Fixes #193

@@ -5,8 +5,7 @@ module.exports = {
* Returns latest tag, sorted by version or null if no tag was found
*/
getLatestTag: (prefix) => {
const maybeGrepCommand = prefix !== '' ? `| grep "^${prefix}"` : '';
const stdout = exec(`git tag -l ${maybeGrepCommand} | sort -V | tail -n 1`);
const stdout = exec(`git describe --match="${prefix}*"`);
Copy link
Collaborator

@bgalek bgalek Jul 11, 2024

Choose a reason for hiding this comment

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

We've been there:

https://github.com/allegro-actions/next-version/blame/009d5cda72557245b6abf1a9a82f6d6524baf0a7/git-commands.js#L8

#15

I don't remember why did we got back to tag -l, until we find out why, I'm not ok with this change

Copy link
Collaborator

@bgalek bgalek left a comment

Choose a reason for hiding this comment

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

We need to find out why did we changed describe to tag -l

@bgalek bgalek closed this Jul 30, 2024
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.

Look for highest tag in current branch only
2 participants