HMBXR5601-827 - Update compile output suitable for packaging

This commit is contained in:
Dan Hawkins 2019-08-19 15:38:21 +01:00
commit 17ddcb8404

View file

@ -79,10 +79,11 @@ def doExport(exportfolder, exportpathlist, partdest = "", build_variant = "") {
}
}
dir (destFolder) {
echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\""
def destFolderExpanded = destFolder.replace("-BUILDVARIANT-", "${build_variant}")
echo "Copy \"${srcFileExpanded}\" to \"${destFolderExpanded}\""
if (isUnix()) {
result = sh( script: """
cp -r -v "${srcFileExpanded}" "${destFolder}"
cp -r -v "${srcFileExpanded}" "${destFolderExpanded}"
if [ \$? -ne 0 ]; then exit 1; fi
""",
returnStatus: true
@ -93,7 +94,7 @@ def doExport(exportfolder, exportpathlist, partdest = "", build_variant = "") {
}
else {
result = bat( script: """
copy "${srcFileExpanded}" "${destFolder}"
copy "${srcFileExpanded}" "${destFolderExpanded}"
if errorlevel 1 EXIT /b 1
""",
returnStatus: true
@ -209,12 +210,20 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou
}
}
else {
// Only export if the project has no variants - signifying that there are files to export which have been prebuilt
if (!variants) {
result = doExport(exportfolder, exportpathlist, destpart)
if (result != 0) {
error "Failed to copy...."
}
} else {
for (build_variant in variants) {
if (toBuild.contains(build_variant)) {
result = doExport(exportfolder, exportpathlist, destpart, build_variant)
if (result != 0) {
error "Failed to copy...."
}
}
}
}
}
}