upgrade to SNAPSHOT version during developement
Closed this issue · 2 comments
Here is my issue with SNAPSHOT using Git+Maven+RPM during development.
- i have 2 releases of
myProject
version 6.1.6 release 2_1 and 3_1.- upgrade from 2_1 to 3_1 is working fine with
yum update
. - these versions are from the release branch, where the POM have the correct release number e.g.
<version>6.1.6-3</version>
- the suffix _1 is added by the rpm plugin (as expected)
- upgrade from 2_1 to 3_1 is working fine with
assuming i need to fix a bug in version 3_1:
- git checkout to feature branch
- change the POM in the feature branch is
<version>6.1.6-SNAPSHOT</version>
- the RPMS are created as documented but, i can't upgrade to them since SNAPSHOT is "older" than "3_1"
- change the POM in the feature branch is
What am i missing?
maybe the plugin use epoch
for SNAPSHOT builds?
here is example of my yum repo:
yum list available myProject --show-duplicates
myProject.x86_64 6.1.6-SNAPSHOT20190430102710 feature-fixBug01-Artifactory
myProject.x86_64 6.1.6-SNAPSHOT20190430221146 feature-fixBug01-Artifactory
myProject.x86_64 6.1.6-2_1 Artifactory
myProject.x86_64 6.1.6-3_1 Artifactory
can you try to set version to 6.1.6-3.1-SNAPSHOT after releasing 6.1.6-3
this way you can upgrade.
thank you @dantran , i assume this trick will work.
i tried to stay simple, i preferred not touching the rpm version, letting the plugin do the job.
In them Maven pom.xml I define 6.1.6-SNAPSHOT and the CI (Jenkins) replace the SNAPSHOT with version 1,2,3... only on builds that are marked for release (the _1 is added by the plugin). for now, i don't want to touch this mechanism.
In the meantime, i will use the downgrade
method in yum:
yum downgrade myProject-6.1.6-SNAPSHOT20190430221146
related issues: #30, #55, #92
related reading - https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots