From f0ef516b8e5383d047524bff65c0e6c6067eaeda Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 19 Aug 2019 15:12:50 +0100 Subject: [PATCH] HMBXR5601-827 - Update compile output suitable for packaging --- compile/eclipsebuild/eclipseds5build.groovy | 27 +++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.groovy b/compile/eclipsebuild/eclipseds5build.groovy index 302b4f8..e93ed4b 100644 --- a/compile/eclipsebuild/eclipseds5build.groovy +++ b/compile/eclipsebuild/eclipseds5build.groovy @@ -54,7 +54,7 @@ def doCheck(checkpathlist, build_variant = "") { return result } -def doExport(exportfolder, exportpathlist, project = "", build_variant = "") { +def doExport(exportfolder, exportpathlist, partdest = "", build_variant = "") { def result = 0 def destFolder = "" def srcFile = "" @@ -71,9 +71,12 @@ def doExport(exportfolder, exportpathlist, project = "", build_variant = "") { } else { echo "No build variant" - destFolder = "${exportfolder}/${project}" + destFolder = "${exportfolder}" srcFileExpanded = "${WORKSPACE}/${exportpath}" } + if (partdest) { + destFolder += "/" + partdest + } } dir (destFolder) { echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" @@ -146,7 +149,7 @@ def doImportProjects(ds5folder, toolchainfolder, ds5shellcommand, buildcommand, } // Build and export files -def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sourcefolder, variantstobuild, exportfolder = "${WORKSPACE}/bin") { +def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sourcefolder, variantstobuild, exportfolder = "${WORKSPACE}/export") { toBuild = [] if (variantstobuild) { toBuildUntrimmed = variantstobuild.split(',') @@ -162,32 +165,26 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou doImportProjects(ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sourcefolder) } for (appInfo in apps ) { - (build, cleanbuild, project, variants, exportpathlist) = appInfo + (build, project, variants, exportpathlist, destpart) = appInfo if (build) { - if (cleanbuild) { - buildtype = "-cleanBuild" - } - else { - buildtype = "-build" - } for (build_variant in variants) { retry(maxprojectbuildretries) { // Eclipse occasionally raises exceptions (rather than the builds failing) try { if (toBuild.contains(build_variant)) { doDisplayLeftovers() doRegisterToolchain(ds5folder, toolchainfolder) - echo "Build command: ${ds5shellcommand} \'${buildcommand} -no-indexer ${buildtype} \"${project}/${build_variant}\"\'" + echo "Build command: ${ds5shellcommand} \'${buildcommand} -no-indexer -build \"${project}/${build_variant}\"\'" timeout(time: 10, unit: 'MINUTES') { if (isUnix()) { sh """ echo Start time: `date` - ${ds5shellcommand} \'${buildcommand} -no-indexer ${buildtype} \"${project}/${build_variant}\"\' + ${ds5shellcommand} \'${buildcommand} -no-indexer -build \"${project}/${build_variant}\"\' echo End time: `date` """ } else { bat """ - "%ds5shellcommand%" "%buildcommand%" -no-indexer ${buildtype} "${project}\\${build_variant}" + "%ds5shellcommand%" "%buildcommand%" -no-indexer -build "${project}\\${build_variant}" """ } } @@ -195,7 +192,7 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou if (result != 0) { error "Failed to check files...." } - result = doExport(exportfolder, exportpathlist, "", build_variant) + result = doExport(exportfolder, exportpathlist, destpart, build_variant) if (result != 0) { error "Failed to copy...." } @@ -214,7 +211,7 @@ 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, project) + result = doExport(exportfolder, exportpathlist, destpart) if (result != 0) { error "Failed to copy...." }