HMBXR5601-143 - Handle projects that aren't built but do provide binaries
This commit is contained in:
parent
b385ea5ba2
commit
0fd3b357a5
1 changed files with 32 additions and 20 deletions
|
|
@ -1,7 +1,34 @@
|
|||
|
||||
def doExport(exportpathlist, build_variant = "") {
|
||||
for (exportpath in exportpathlist) {
|
||||
echo "Export path at: ${exportpath}"
|
||||
script {
|
||||
if (build_variant) {
|
||||
env.destFolder = "${exportfolder}/${build_variant}/${project}"
|
||||
env.srcFile = "${WORKSPACE}/${exportpath}"
|
||||
env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}")
|
||||
}
|
||||
else {
|
||||
env.destFolder = "${exportfolder}/${project}"
|
||||
env.srcFileExpanded = "${WORKSPACE}/${exportpath}"
|
||||
}
|
||||
}
|
||||
dir (env.destFolder) {
|
||||
echo "Copy ${srcFileExpanded} to ${destFolder}"
|
||||
if (isUnix()) {
|
||||
sh 'cp \"${srcFileExpanded}\" ${destFolder}'
|
||||
}
|
||||
else {
|
||||
bat 'copy \"%srcFileExpanded%\" %destFolder%'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build and export files
|
||||
def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
||||
for (appInfo in apps ) {
|
||||
(build, project, variants, exportpath) = appInfo
|
||||
(build, project, variants, exportpathlist) = appInfo
|
||||
if (build) {
|
||||
for (build_variant in variants) {
|
||||
retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing)
|
||||
|
|
@ -15,27 +42,12 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
|||
"""
|
||||
}
|
||||
}
|
||||
if (exportpath) {
|
||||
echo "Export path at: ${exportpath}"
|
||||
script {
|
||||
env.destFolder = "${exportfolder}/${build_variant}/${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%'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
doExport(exportpathlist, build_variant)
|
||||
}
|
||||
}
|
||||
else {
|
||||
doExport(exportpathlist, build_variant)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue