HMBXR5601-827 - Update compile output suitable for packaging
This commit is contained in:
parent
b6aa653aeb
commit
9858ef75a6
1 changed files with 12 additions and 15 deletions
|
|
@ -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...."
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue