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

Version is not resolved correctly when alpha tag and version tag point to the same commit #149

Closed
Endron opened this issue Aug 12, 2016 · 3 comments
Milestone

Comments

@Endron
Copy link

Endron commented Aug 12, 2016

I run into a bug the other day. While preparing to release a new version of our application I added alpha tags to SCM to set the versions I wanted. I did this as shown in the documentation by executing

./gradlew markNextVersion -Prelease.version=<next.version>

This created the tag as expected.
I then created a new release by running

./gradlew release -Prelease.disableUncommittedCheck -Prelease.disableRemoteCheck

This also tagged the version as expected.
Now we have an alpha tag and an release tag pointing to the same commit in the repository,

But then it went downhill when I tried to have the plugin resolve the version

./gradlew currentVersion

Returned a SNAPSHOT version. As the version was what I initially set using "markNextVersion" it looks like the release tag was ignored. The problem with this is that now instead of building the release version I want to deploy to our repository manager (Artifactory) I am still building a SNAPSHOT version.

Environment

  • Plugin version used was 1.3.4
  • "markNextVersion" was executed on Windows 7 running with Java 8 and Gradle 2.12
  • "release" was executed on a Linux CI server running Bamboo. Also Java 8 and Gradle 2.12
  • the prefix for our release tags was "usl-nominator" and "batch-uploader" (I had this problem with two different applications in different git repos.)

Workaround
This does not happen when the alpha and the release tag do not point to the same git commit. So if you put some dummy commit between "markNextVersion" and "release" you are save.

TL;DR
If an alpha tag and an release tag point to the same git commit the version is not recognized correctly. The version is returned as SNAPSHOT when it should be the release version.

@adamdubiel
Copy link
Collaborator

Hi, this is the same issue as discussed in comments in #141 - i will be working on solution to this.

@adamdubiel
Copy link
Collaborator

Closed in 1.5.0 by #156

@radimk
Copy link

radimk commented Sep 8, 2017

Note that #156 didn't fix it. Fortunatelly it is fixed not by 634ff11 in 1.7.2 (which BTW is only available from mavenCentral and not from plugins.gradle.org repo as described in #197).

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