Provide a parameter for deciding where files are exported
This commit is contained in:
parent
9867cf3da3
commit
96bba5d019
1 changed files with 6 additions and 6 deletions
|
|
@ -1,24 +1,24 @@
|
|||
// Build and export files
|
||||
def doBuild(apps) {
|
||||
def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
||||
for (appInfo in apps ) {
|
||||
(build, project, variants, exportpath) = appInfo
|
||||
if (build) {
|
||||
for (build_variant in variants) {
|
||||
retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing)
|
||||
if (isUnix()) {
|
||||
echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\""
|
||||
echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\""
|
||||
sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\""
|
||||
}
|
||||
}
|
||||
else {
|
||||
bat """
|
||||
"%BUILD_COMMAND%" -build "${project}\\${build_variant}"
|
||||
"""
|
||||
"%BUILD_COMMAND%" -build "${project}\\${build_variant}"
|
||||
"""
|
||||
}
|
||||
}
|
||||
if (exportpath) {
|
||||
echo "Export path at: ${exportpath}"
|
||||
script {
|
||||
env.destFolder = "${WORKSPACE}/export/${build_variant}/${project}"
|
||||
env.destFolder = "${exportfolder}/${build_variant}/${project}"
|
||||
env.srcFile = "${WORKSPACE}/${exportpath}"
|
||||
env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue