Jenkinsfile: Put shipped Premake5 into PATH.
This commit is contained in:
parent
283a747352
commit
45a633e672
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -42,15 +42,19 @@ import groovy.transform.Field
|
|||||||
"ReleaseStatic"
|
"ReleaseStatic"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def useShippedPremake(f) {
|
||||||
|
def premakeHome = "${pwd()}\\tools"
|
||||||
|
|
||||||
|
withEnv(["PATH+=${premakeHome}"], f)
|
||||||
|
}
|
||||||
|
|
||||||
// This will build the IW4x client.
|
// This will build the IW4x client.
|
||||||
// We need a Windows Server with Visual Studio 2015, Premake5 and Git on it.
|
// We need a Windows Server with Visual Studio 2015, Premake5 and Git on it.
|
||||||
def doBuild(name, premakeFlags, configuration) {
|
def doBuild(name, premakeFlags, configuration) {
|
||||||
node("windows") {
|
node("windows") {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
premakeHome = "${pwd()}\\tools"
|
useShippedPremake {
|
||||||
|
|
||||||
withEnv(["PATH+=${premakeHome}"]) {
|
|
||||||
def outputDir = pwd()
|
def outputDir = pwd()
|
||||||
def msbuild = tool "Microsoft.NET MSBuild 14.0"
|
def msbuild = tool "Microsoft.NET MSBuild 14.0"
|
||||||
bat "premake5 vs2015 $premakeFlags"
|
bat "premake5 vs2015 $premakeFlags"
|
||||||
@ -105,10 +109,12 @@ stage("Checkout & Versioning") {
|
|||||||
node("windows") {
|
node("windows") {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
version = bat(returnStdout: true, script: 'premake5 version').split("\r?\n")[1]
|
useShippedPremake {
|
||||||
|
def version = bat(returnStdout: true, script: 'premake5 version').split("\r?\n")[1]
|
||||||
|
|
||||||
currentBuild.setDisplayName "$version (#${env.BUILD_NUMBER})"
|
currentBuild.setDisplayName "$version (#${env.BUILD_NUMBER})"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For each available configuration generate a normal build and a unit test build.
|
// For each available configuration generate a normal build and a unit test build.
|
||||||
|
Loading…
Reference in New Issue
Block a user