Revert "HMBXR5601-328 - Use make instead of eclipsebuild"
This reverts commit 5e1e0c9d47cfaa4c366b84da4f8a583c93ae9693.
This commit is contained in:
parent
c902757cc8
commit
1869a40da9
1 changed files with 9 additions and 46 deletions
|
|
@ -1,44 +1,37 @@
|
|||
|
||||
def doExport(exportfolder, exportpathlist, build_variant = "", project_root = "") {
|
||||
def doExport(exportfolder, exportpathlist, build_variant = "") {
|
||||
for (exportpath in exportpathlist) {
|
||||
echo "Export path at: ${exportpath}"
|
||||
env.srcFile = "${WORKSPACE}/${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 = srcFile.replace("-BUILDVARIANT-", "${build_variant}")
|
||||
env.srcFile = "${WORKSPACE}/${exportpath}"
|
||||
env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}")
|
||||
}
|
||||
else {
|
||||
echo "No build variant"
|
||||
env.destFolder = "${exportfolder}/${project}"
|
||||
}
|
||||
echo "Project root is ${project_root}"
|
||||
if (project_root) {
|
||||
echo "Project root is ${project_root}"
|
||||
env.srcFile = srcFile.replace("-PROJECTROOT-", "${project_root}")
|
||||
}
|
||||
else {
|
||||
echo "No project root"
|
||||
env.srcFileExpanded = "${WORKSPACE}/${exportpath}"
|
||||
}
|
||||
}
|
||||
dir (env.destFolder) {
|
||||
echo "Copy \"${srcFile}\" to \"${destFolder}\""
|
||||
echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\""
|
||||
if (isUnix()) {
|
||||
sh "cp -v \"${srcFile}\" \"${destFolder}\""
|
||||
sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\""
|
||||
}
|
||||
else {
|
||||
bat 'copy \"%srcFile%\" \"%destFolder%\"'
|
||||
bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build and export files using Eclipse project files (unreliable)
|
||||
// Build and export files
|
||||
def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
||||
for (appInfo in apps ) {
|
||||
(build, cleanbuild, project, projectroot, variants, exportpathlist) = appInfo
|
||||
(build, cleanbuild, project, variants, exportpathlist) = appInfo
|
||||
if (build) {
|
||||
if (cleanbuild) {
|
||||
buildtype = "-cleanBuild"
|
||||
|
|
@ -70,34 +63,4 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") {
|
|||
}
|
||||
}
|
||||
|
||||
// Build and export files using make files generated by Eclipse
|
||||
def doMake(apps, exportfolder = "${WORKSPACE}/bin") {
|
||||
for (appInfo in apps ) {
|
||||
(build, cleanbuild, project, variants, projectroot, exportpathlist) = appInfo
|
||||
if (build) {
|
||||
for (build_variant in variants) {
|
||||
echo "Changing directory to: ${WORKSPACE}/${projectroot}/${build_variant}"
|
||||
dir("${WORKSPACE}/${projectroot}/${build_variant}") {
|
||||
echo "Build command: ${BUILD_COMMAND}"
|
||||
if (isUnix()) {
|
||||
sh "${BUILD_COMMAND}"
|
||||
}
|
||||
else {
|
||||
bat """
|
||||
"%BUILD_COMMAND%"
|
||||
"""
|
||||
}
|
||||
}
|
||||
doExport(exportfolder, exportpathlist, build_variant, projectroot)
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Only export if the project has no variants - signifying that there are files to export which have been prebuilt
|
||||
if (!variants) {
|
||||
doExport(exportfolder, exportpathlist)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue