Make variants of build all in one run
This commit is contained in:
parent
ff5b8f515e
commit
c21c6348a4
1 changed files with 25 additions and 25 deletions
|
|
@ -1,38 +1,38 @@
|
|||
// Build and export files
|
||||
def doBuild(apps) {
|
||||
for (appInfo in apps ) {
|
||||
env.build = appInfo[0]
|
||||
env.project = appInfo[1]
|
||||
env.variants = appInfo[2]
|
||||
env.exportpath = appInfo[3]
|
||||
if (build)
|
||||
{
|
||||
build = appInfo[0]
|
||||
project = appInfo[1]
|
||||
variants = appInfo[2]
|
||||
exportpath = appInfo[3]
|
||||
if (build) {
|
||||
for (build_variant in variants) {
|
||||
retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing)
|
||||
if (isUnix()) {
|
||||
sh "${BUILD_COMMAND} -build ${project}/${build_variant}"
|
||||
}
|
||||
else {
|
||||
bat "%BUILD_COMMAND% -build ${project}/${build_variant}"
|
||||
}
|
||||
}
|
||||
echo "Export path at: ${exportpath}"
|
||||
script {
|
||||
env.destFolder = "${WORKSPACE}/export/${project}"
|
||||
env.srcFile = "${WORKSPACE}/${exportpath}"
|
||||
env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}")
|
||||
}
|
||||
dir (env.destFolder) {
|
||||
if (exportpath) {
|
||||
echo "Copy ${srcFileExpanded} to ${destFolder}"
|
||||
if (isUnix()) {
|
||||
sh 'cp \"${srcFileExpanded}\" ${destFolder}'
|
||||
sh "${BUILD_COMMAND} -build ${project}/${build_variant}"
|
||||
}
|
||||
else {
|
||||
bat 'copy \"%srcFileExpanded%\" %destFolder%'
|
||||
bat "%BUILD_COMMAND% -build ${project}/${build_variant}"
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "Export path at: ${exportpath}"
|
||||
script {
|
||||
env.destFolder = "${WORKSPACE}/export/${project}"
|
||||
env.srcFile = "${WORKSPACE}/${exportpath}"
|
||||
env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}")
|
||||
}
|
||||
dir (env.destFolder) {
|
||||
if (exportpath) {
|
||||
echo "Copy ${srcFileExpanded} to ${destFolder}"
|
||||
if (isUnix()) {
|
||||
sh 'cp \"${srcFileExpanded}\" ${destFolder}'
|
||||
}
|
||||
else {
|
||||
bat 'copy \"%srcFileExpanded%\" %destFolder%'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue