Browse Source

Add version bump to jenkinsfile

pull/5/head
Ionite 1 year ago
parent
commit
4d1709ddf9
No known key found for this signature in database
  1. 14
      Jenkinsfile

14
Jenkinsfile vendored

@ -15,12 +15,18 @@ node("Windows") {
bat "dotnet test StabilityMatrix.Tests"
}
stage('Publish') {
bat "dotnet publish .\\StabilityMatrix\\StabilityMatrix.csproj -c Release -o out -r win-x64 -p:PublishSingleFile=true --self-contained true"
stage('Set Version') {
if (env.BRANCH_NAME == 'main') {
version = VersionNumber projectStartDate: '', versionNumberString: '1.0.${BUILDS_ALL_TIME}.0', versionPrefix: '', worstResultForIncrement: 'SUCCESS'
}
}
stage('Set Version') {
version = VersionNumber projectStartDate: '', versionNumberString: '${BUILD_DATE_FORMATTED, "yy"}.${BUILD_WEEK}.${BUILDS_THIS_WEEK}', versionPrefix: '', worstResultForIncrement: 'SUCCESS'
stage('Publish') {
if (env.BRANCH_NAME == 'main') {
bat "dotnet publish .\\StabilityMatrix\\StabilityMatrix.csproj -c Release -o out -r win-x64 -p:PublishSingleFile=true -p:Version=${version} --self-contained true"
} else {
bat "dotnet publish .\\StabilityMatrix\\StabilityMatrix.csproj -c Release -o out -r win-x64 -p:PublishSingleFile=true --self-contained true"
}
}
if (env.BRANCH_NAME == "main") {

Loading…
Cancel
Save