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