Open Mabmessaoud opened 3 years ago
@Mabmessaoud What the issue here? You can change version to increment RC.
@Mabmessaoud Ping
HI @aleksandr-m First of all , I would like to thank you for the plugin, since i installed it on our project it made it much easier for us to manage the lifecycle of our gitflow project. It has become essential , thank you for your hard work !
I will rejoice on @Mabmessaoud request and agree on the usefulness of this option ! In our project we manage release candidate too and it would be very useful to be able to configure a custom suffix ( like atlassian jgitflow plugin do : https://bitbucket.org/atlassian/jgit-flow/wiki/goals/release-start#!releasebranchversionsuffix) when we invoke gitflow:release-start Currently we have only stable release ( ex : 1.0.0 ) or release with snapshot( with useSnapshotInRelease parameter) but some projects needs the use of release candidates before validate a stable release
Thank you very much !
@ulquio So it will append some string to version in the pom, but leaves branch name as it is? And what's next? How it will be incremented? By hand? Why not to change it after release-goal
?
@aleksandr-m
Exactly !
Say you have a version 1.0.0-SNAPSHOT , when you do the release-start goal , if we have a
For example , what i am currently doing with Jenkins ( jenkinsfile) in conjonction with your wonderful plugin
stage('Set version') {
steps {
script {
if (env.BRANCH_NAME.startsWith('release/')) {
VERSION = "${GIT_BRANCH.replaceAll('/', '-').replaceAll('origin-', '').replaceAll('release-', '')}" + '-RC-' + "${env.BUILD_NUMBER}"
configFileProvider([configFile(fileId: 'Global_Maven_Settings', variable: 'MAVEN_SETTINGS_XML')]) {
sh "mvn --no-transfer-progress -s $MAVEN_SETTINGS_XML -N versions:set-property -Dproperty=revision -DnewVersion=$VERSION -DgenerateBackupPoms=false"
}
stash includes: 'pom.xml' , name: 'parent_pom'
}
}
}
}
Thank you very much
I don't see much benefit introducing this property to plugin, you still need some script to update it and you can run it after release-start
goal as well. But I'm happy to review / accept PR-s.
Hello @aleksandr-m . I would like a plugin-managed feature like this, too. I would describe the precise operation as follows:
I agree with your point that you can just change the version however you want to change it on the release branch. But, to have this automated, along with optional merging down to dev, and creating tags, makes this a lot more convenient and simpler for people who are maintaining the git repo, and the release process.
I do not mind contributing, if this is something that you might not have time to do. I might need some pointers on a general approach (for the way that you might do it). I could script this in bash, but it seems like such a common use case when releasing software that it seems like many, many people would find this useful.
Either way, please let me know your thoughts. And thank you for your time and for writing this useful plugin.
I was working on this today, and I have it almost finished. I have a couple more test cases to write, and then everybody can review it and see if it seems useful.
@aleksandr-m If this is under ASL 2.0, can you really say that it is under a copyright owned by you? I am just wondering because I added the license comment text to a mojo file that I added.
I've made version update goal for updating versions in support branches for #269. It can be adjusted to be able to update version in release branch as well. So, this part is almost finished. Stay tuned.
Version update goal is ready.
It seems that doing a release-finish will move the -RC* suffix to the master branch.
Would be possible to have a digitsOnlyMasterVersion
as we already have digitsOnlyDevVersion
?
The intention is to remove the "-RC1" on the master branch after "release-finish", replacing "1.1.0-RC1" to "1.1.0" in Master, finally tagging as 1.1.0.
@dagutten Can you create a separate issue for this.
It seems that doing a release-finish will move the -RC* suffix to the master branch.
Would be possible to have a
digitsOnlyMasterVersion
as we already havedigitsOnlyDevVersion
?The intention is to remove the "-RC1" on the master branch after "release-finish", replacing "1.1.0-RC1" to "1.1.0" in Master, finally tagging as 1.1.0.
@dagutten @aleksandr-m Is there any update on this?
Hello, as part of one of our maven projects, we used your plugin for setting up gitflow. the plugin in its standard use is perfect. however to create release candidates I would like to update the version in the pom.xml of the release branch to 1.0.0-RC1 and with each commit we increment the RC index to update the version to RC2,..., RCn .
Let me explain, suppose I have 1.0.0-SNAPSHOT on develop and when I use gitflow:release-start I would like to have a branch release "release / 1.0.0" with a maven version 1.0.0-RC1. would it be possible to put this workflow with this plugin.
we use maven 3.8.1, java 11 and gitlab-CI
Thank you.