Created
March 15, 2018 22:22
-
-
Save alanedwardes/4c4e7a7107853b0310e26e3f09c9ac61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Checkout and store away result | |
def checkoutResult = scm checkout | |
// Build a human readable build label | |
def buildLabel = [env.EstPlatform, checkoutResult.GIT_COMMIT.substring(0, 6), env.JOB_NAME, env.BUILD_NUMBER].join('-') | |
// Stamp the build config header file | |
def configFile = 'Depot/Source/EstCore/EstBuildConfig.h' | |
def buildConfig = readFile file: configFile | |
buildConfig += '\n#undef BUILD_COMMIT' | |
buildConfig += '\n#define BUILD_COMMIT "' + checkoutResult.GIT_COMMIT + '"' | |
buildConfig += '\n#undef BUILD_LABEL' | |
buildConfig += '\n#define BUILD_LABEL "' + buildLabel + '"' | |
writeFile file: configFile, text: buildConfig | |
// Compile, package, deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment