diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2016-02-17 22:23:00 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2016-04-20 20:35:13 (GMT) |
commit | 732169d86a0ea74e8a4fa75bc6fae18e10a0aeb3 (patch) | |
tree | f0be5d31261fe731ebf3f95c13d5a38a3d146616 | |
parent | f3de04c95496fbee09c3c8f9e31deb5351de1b4d (diff) | |
download | mxe-732169d86a0ea74e8a4fa75bc6fae18e10a0aeb3.zip mxe-732169d86a0ea74e8a4fa75bc6fae18e10a0aeb3.tar.gz mxe-732169d86a0ea74e8a4fa75bc6fae18e10a0aeb3.tar.bz2 |
build-pkg: exit with non-zero if second pass fails
-rwxr-xr-x | tools/build-pkg.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index d02a29e..81b0391 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -1013,9 +1013,13 @@ local function main() local build_list = sortForBuild(items, item2deps) assert(isTopoOrdered(build_list, items, item2deps)) build_list = sliceArray(build_list, max_items) + local first_pass_failed, second_pass_failed local unbroken, item2files = buildPackages( build_list, item2deps, 'first' ) + if #unbroken < #build_list then + first_pass_failed = true + end gitCheckout( itemToBranch(GIT_ALL_PSEUDOITEM, 'first'), unbroken, @@ -1029,11 +1033,14 @@ local function main() end makeMxeSourcePackage() if not no_second_pass then - buildPackages( + local unbroken_second = buildPackages( build_list, item2deps, 'second', item2files ) + if #unbroken_second < #build_list then + second_pass_failed = true + end end - if #unbroken < #build_list then + if first_pass_failed or second_pass_failed then local code = 1 local close = true os.exit(code, close) |