HMBXR5601-143 - Handle projects that aren't built but do provide binaries

This commit is contained in:
Dan Hawkins 2018-06-12 18:30:39 +01:00
commit 9f58f571b3

View file

@ -3,20 +3,23 @@ def doExport(exportfolder, exportpathlist, build_variant = "") {
for (exportpath in exportpathlist) {
echo "Export path at: ${exportpath}"
script {
echo "Build variant is ${build_variant}"
if (build_variant) {
echo "Build variant is ${build_variant}"
env.destFolder = "${exportfolder}/${build_variant}/${project}"
env.srcFile = "${WORKSPACE}/${exportpath}"
env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}")
}
else {
echo "No build variant"
env.destFolder = "${exportfolder}/${project}"
env.srcFileExpanded = "${WORKSPACE}/${exportpath}"
}
}
dir (env.destFolder) {
echo 'Copy \"${srcFileExpanded}\" to \"${destFolder}\"'
echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\""
if (isUnix()) {
sh "cp -v ${srcFileExpanded} \"${destFolder}\""
sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\""
}
else {
bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"'