From: Tobias Ulmer Date: Tue, 25 Oct 2016 19:37:43 +0000 (+0200) Subject: e2-build: warn about left out deploy results in release mode X-Git-Tag: e2factory-2.3.15rc1~53 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=94508cf1ae577b1d09f8e3379e04793a540b1b99;p=e2factory.git e2-build: warn about left out deploy results in release mode Signed-off-by: Tobias Ulmer --- diff --git a/local/e2-build.lua b/local/e2-build.lua index bf29b18..872541a 100644 --- a/local/e2-build.lua +++ b/local/e2-build.lua @@ -26,8 +26,9 @@ local e2option = require("e2option") local e2tool = require("e2tool") local err = require("err") local policy = require("policy") -local scm = require("scm") +local project = require("project") local result = require("result") +local scm = require("scm") local function e2_build(arg) local rc, re = e2lib.init() @@ -178,6 +179,27 @@ local function e2_build(arg) end end + -- in --release mode, warn about builds not including the + -- configured deploy results + if opts.release then + for deployresname in project.deploy_results_iter() do + local included = false + + for _, resultname in ipairs(sel_res) do + if deployresname == resultname then + included = true + break + end + end + + if not included then + e2lib.warnf("WOTHER", + "release build does not include deploy result: %s", + deployresname) + end + end + end + rc, re = e2tool.print_selection(info, sel_res) if not rc then error(re)