diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index a4ee79a..6e24393 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -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%' + } + } + } + } } } }