Closed mkrebs81 closed 1 month ago
Hmm, that's strange. Let me check this. Palantir should take the latest tag, which is 1.1.0, when you check out 1.1.0 I think. However may I misunderstood something...
When I add version = rootProject.version
to the CommHandler4Modbus build file, it works.
Setting the version in publishing {...}
is probably not correct, or does not work as intended.
To check, I did the following:
then I did:
It seems to work on my machine without moving the tag out of the publishing {...}
.
However, I am not sure if it was a good idea to add SNAPSHOT depending on the branch not being 'master'. Maybe using just 'isCleanTag' and 'commitDistance' is enough. So we can use the branch name 'rel-1.1.0' or something like that whe checking out the 1.1.0 tag.
It's weird... after trying again a few times, I also get the correct version in my local maven repo.
Note that ./gradlew printVersion
outputs the root project's version and not the version of the actual project.
But it seems to work when publishing.
I agree that it might be feasible to ignore the branch name. That way we could also create updated releases on older branches, like 1.0.x
.
Right. I will remove the master
check.
will be removed in refactoring
When I check out the master branch and compile, I get
1.1.0-SNAPSHOT
as version string, which seems correct. This also happens when the commit of the master branch matches the latest release tag.When I check out a release tag like
1.1.0
directly, I getunspecified
as version string, instead of1.1.0
.