Skip to content

Commit b5c2d7d

Browse files
authored
ci: Update generated source code (#2)
Generated SDK source code using: - Generator version 3.10.3 - Specification version 0.0.24 - Automation (cloudant-sdks) version 307d68e
1 parent 75a2133 commit b5c2d7d

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Jenkinsfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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 '[email protected].com'
22+
git config user.email '[email protected].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
8383
void 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

Comments
 (0)