From df638458def8228976552ac48bc44e6770b57335 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 11 Oct 2018 20:48:16 +0100 Subject: [PATCH] Fail build if a copy fails --- compile/eclipsebuild/eclipseds5build.gsh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 9fd5293..3061fea 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -154,7 +154,10 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou """ } } - doExport(exportfolder, exportpathlist, "", build_variant) + result = doExport(exportfolder, exportpathlist, "", build_variant) + if (result != 0) { + error "Failed to copy...." + } } catch (Exception e) { echo "Build failed - Waiting for a while" sleep(time: 4, unit: 'SECONDS') @@ -166,7 +169,10 @@ 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) { - doExport(exportfolder, exportpathlist, project) + result = doExport(exportfolder, exportpathlist, project) + if (result != 0) { + error "Failed to copy...." + } } } }