Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package versioning in Jenkins jobs #1187

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ node('rhel8') {

stage('package') {
def packageJson = readJSON file: 'package.json'
// We always replace MAJOR.MINOR.PATCH from package.json with MAJOR.MINOR.BUILD
def version = packageJson.version[0..packageJson.version.lastIndexOf('.') - 1] + ".${env.BUILD_NUMBER}"
// We add "-alpha" for pre-releases and add "+BUILD" at the end, i.e. results would be either MAJOR.MINOR.PATCH+BUILD or MAJOR.MINOR.PATCH-alpha+BUILD
def version = packageJson.version + "${ params.publishPreRelease ? '-alpha' : '' }+${env.BUILD_NUMBER}"
sh "yarn run vsce package ${ params.publishPreRelease ? '--pre-release' : '' } --no-dependencies --no-git-tag-version --no-update-package-json ${ version }"
}

Expand Down