@@ -8,7 +8,7 @@ pipeline {
8
8
skipDefaultCheckout()
9
9
}
10
10
environment {
11
- GH_CREDS = credentials(' ibm-ghe ' )
11
+ GH_CREDS = credentials(' github-token ' )
12
12
}
13
13
stages {
14
14
stage(' Checkout' ) {
@@ -19,7 +19,7 @@ pipeline {
19
19
checkoutResult = checkout scm
20
20
commitHash = " ${ checkoutResult.GIT_COMMIT[0..6]} "
21
21
sh """
22
- git config user.email '[email protected] .com'
22
+ git config user.email '[email protected] .com'
23
23
git config user.name 'cloudant-sdks-automation'
24
24
git config credential.username '${ env.GH_CREDS_USR} '
25
25
git config credential.helper '!f() { echo password=\$ GH_CREDS_PSW; echo; }; f'
@@ -83,12 +83,19 @@ def customizeVersion
83
83
void defaultInit () {
84
84
// Default to using bump2version
85
85
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 ->
86
95
// Identify what the next patch version is
87
96
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)
92
99
}
93
100
94
101
// Default no-op implementation to use semverFormatVersion
0 commit comments