Permalink
Browse files

Read version info from a file (and bump version to 13.1) (#130)

* Read version info from a file

* update version number to 11.1

* Update Jenkinsfile to match Util's
  • Loading branch information...
f00f authored and mischastik committed May 16, 2018
1 parent 08b2346 commit d17dcea5462372de869d2499f18f2cdaef91ad97
Showing with 21 additions and 9 deletions.
  1. +2 −1 MetriCam2_SDK.sln
  2. +13 −8 { → Scripts}/Jenkinsfile.groovy
  3. +3 −0 Scripts/Set Assembly-Info Version.cmd
  4. +3 −0 version.properties
@@ -43,11 +43,12 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F8B72304-05F7-411A-8A32-8D12BB5BA37E}"
ProjectSection(SolutionItems) = preProject
.licenseheader = .licenseheader
Jenkinsfile.groovy = Jenkinsfile.groovy
Scripts\Jenkinsfile.groovy = Scripts\Jenkinsfile.groovy
MetrilusReferencesVersions.props = MetrilusReferencesVersions.props
Scripts\Set Assembly-Info Version.cmd = Scripts\Set Assembly-Info Version.cmd
SolutionAssemblyInfo.cs = SolutionAssemblyInfo.cs
SolutionAssemblyInfo.h = SolutionAssemblyInfo.h
version.properties = version.properties
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kinect2", "BetaCameras\Kinect2\Kinect2.csproj", "{03558646-61B1-4F4E-BF70-7A623DF27095}"
@@ -2,7 +2,13 @@
pipeline {
agent any
environment {
def versionInfo = readProperties file:'version.properties'
def V_MAJOR = "${versionInfo['VERSION_MAJOR']}"
def V_MINOR = "${versionInfo['VERSION_MINOR']}"
def V_BUILD = "${versionInfo['VERSION_BUILD']}"
def dllsToDeployX64 = 'CookComputing.XmlRpcV2 MetriCam2.Cameras.BaslerACE MetriCam2.Cameras.BaslerToF MetriCam2.Cameras.ifm MetriCam2.Cameras.Kinect2 MetriCam2.Cameras.MatrixVision MetriCam2.Cameras.OrbbecOpenNI MetriCam2.Cameras.Sick.TiM561 MetriCam2.Cameras.Sick.VisionaryT MetriCam2.Cameras.SVS MetriCam2.Cameras.TIVoxel MetriCam2.Cameras.UEye MetriCam2.Cameras.WebCam'
def dllsToDeployAnyCPU = 'Intel.RealSense log4net MathNet.Numerics MetriCam2 MetriCam2.Cameras.RealSense2 MetriCam2.Controls Metrilus.Util Newtonsoft.Json'
def dllsToDeployNetStandard = 'MetriCam2.NetStandard MetriCam2.Cameras.RealSense2.NetStandard Metrilus.Util.NetStandard'
@@ -11,8 +17,9 @@ pipeline {
def msbuildToolName = 'MSBuild Release/x64 [v15.0 / VS2017]'
def solutionFilename = 'MetriCam2_SDK.sln'
def releaseVersion = getReleaseVersion(currentBranch);
def releaseFolder = getReleaseFolder(currentBranch, releaseVersion)
def releaseVersion = getReleaseVersion(currentBranch, V_MAJOR, V_MINOR, V_BUILD);
def niceVersion = "${releaseVersion}"
def releaseFolder = getReleaseFolder(currentBranch, niceVersion)
def releaseDirectory = "Z:\\releases\\MetriCam2\\${releaseFolder}"
def releaseLibraryDirectory = "${releaseDirectory}\\lib"
@@ -23,6 +30,7 @@ pipeline {
def BUILD_DATETIME = new Date(currentBuild.startTimeInMillis).format("yyyyMMdd-HHmm")
def BUILD_URL = "${BUILD_URL}".replace("http://", "https://").replace("-server.metrilus.informatik.uni-erlangen.de:8080", ".metrilus.de")
}
stages {
stage('Pre-Build') {
steps {
@@ -39,10 +47,7 @@ pipeline {
%REFERENCE_CHECKER% -j "%JOB_NAME%" "%WORKSPACE%"
'''
bat """
@echo Updating Assembly-Info ...
\"Scripts\\Set Assembly-Info Version.cmd\" \"SolutionAssemblyInfo.cs\" ${releaseVersion}
"""
bat "\"Scripts\\Set Assembly-Info Version.cmd\" \"SolutionAssemblyInfo.cs\" ${releaseVersion}"
}
}
@@ -216,10 +221,10 @@ def setBuildStatus(String message, String state, String context, String sha) {
]);
}
def getReleaseVersion(String branchName) {
def getReleaseVersion(String branchName, String major, String minor, String build) {
def releaseRevision = currentBuild.number.toString();
return "stable" == branchName
? "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}.${releaseRevision}"
? "${major}.${minor}.${build}.${releaseRevision}"
: "0.0.0.${releaseRevision}";
}
@@ -1 +1,4 @@
@echo off
echo Updating Assembly-Info: %2
@powershell -Command "(get-content \"%~f1\") | foreach-object { $_ -replace \"(Assembly\w*Version)\(`\"(\d+\.\d+\.\d+\.\d+)`\"\)\", \"`$1(`\"%2`\")\" } | set-content \"%~f1\""
@@ -0,0 +1,3 @@
VERSION_MAJOR=11
VERSION_MINOR=1
VERSION_BUILD=0

0 comments on commit d17dcea

Please sign in to comment.