@@ -8,7 +8,7 @@ pipeline {
88 skipDefaultCheckout()
99 }
1010 environment {
11- GH_CREDS = credentials(' ibm-ghe ' )
11+ GH_CREDS = credentials(' github-token ' )
1212 }
1313 stages {
1414 stage(' Checkout' ) {
@@ -19,7 +19,7 @@ pipeline {
1919 checkoutResult = checkout scm
2020 commitHash = " ${ checkoutResult.GIT_COMMIT[0..6]} "
2121 sh """
22- git config user.email 'nomail@hursley.ibm .com'
22+ git config user.email 'ricellis@users.noreply.github .com'
2323 git config user.name 'cloudant-sdks-automation'
2424 git config credential.username '${ env.GH_CREDS_USR} '
2525 git config credential.helper '!f() { echo password=\$ GH_CREDS_PSW; echo; }; f'
@@ -83,12 +83,19 @@ def customizeVersion
8383void defaultInit () {
8484 // Default to using bump2version
8585 bumpVersion = { isDevRelease ->
86+ newVersion = getNextVersion(isDevRelease)
87+ doVersionBump(isDevRelease, newVersion)
88+ }
89+
90+ doVersionBump = { isDevRelease , newVersion , allowDirty ->
91+ sh " bump2version --new-version ${ newVersion} ${ allowDirty ? '--allow-dirty': ''} ${ isDevRelease ? '--no-commit' : '--tag --tag-message "Release {new_version}"'} patch"
92+ }
93+
94+ getNextVersion = { isDevRelease ->
8695 // Identify what the next patch version is
8796 patchBumpedVersion = sh returnStdout : true , script : ' bump2version --list --dry-run patch | grep new_version=.* | cut -f2 -d='
88- // Now bump to the new version
89- newVersion = getNewVersion(isDevRelease, patchBumpedVersion)
90- sh " bump2version --new-version ${ newVersion} ${ isDevRelease ? '--no-commit' : '--tag --tag-message "Release {new_version}"'} patch"
91- return newVersion
97+ // Now the customized new version
98+ return getNewVersion(isDevRelease, patchBumpedVersion)
9299 }
93100
94101 // Default no-op implementation to use semverFormatVersion
0 commit comments