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

[Feature / suggestion] Print warning when no prior version is detected #826

Open
ddeath opened this issue Oct 1, 2024 · 2 comments
Open

Comments

@ddeath
Copy link

ddeath commented Oct 1, 2024

I saw it couple times in our project, sometimes the plugin probably does not detect any tag or something and it will create default initial version of 0.1.0 even though there are 10 prior tags. This is happening on Gitlab CI pipeline.

I found the issue. Basically default behavior of Gitlab is that it will fetch (not clone) repository and on top of that only top 20 commits. So if you have maybe monorepo, or for some any other reason you didnt release in last 20 commits, axion will not find any tag tight to those commits and will assume this is the first release and will use 0.1.0 version.
Above situation will usually result in error:

remote status: REJECTED_NONFASTFORWARD
remote message: 
> Task :release FAILED

Because axion will try to push tag 0.1.0 but it already exists.

This was kind of hard to debug therefore I would suggest to print Didn't detect any previous version in available git history, treating it as new release which will get more explicit hint to the developer.

Ideally I would add some debug / verbose mode where plugin would also tags it sees and then all matching tags etc...

@tomasz-pankowski-allegro

spojrzę na to zadanie w ramach hacktoberfest

@tomasz-pankowski-allegro

PR: #844

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

No branches or pull requests

3 participants