Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

upgrade to SNAPSHOT version during developement #110

Closed
yarix opened this issue May 1, 2019 · 2 comments
Closed

upgrade to SNAPSHOT version during developement #110

yarix opened this issue May 1, 2019 · 2 comments

Comments

@yarix
Copy link

yarix commented May 1, 2019

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)

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"

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
@dantran
Copy link
Contributor

dantran commented May 2, 2019

can you try to set version to 6.1.6-3.1-SNAPSHOT after releasing 6.1.6-3
this way you can upgrade.

@yarix
Copy link
Author

yarix commented May 5, 2019

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

@yarix yarix closed this as completed May 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants