From 94508cf1ae577b1d09f8e3379e04793a540b1b99 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 25 Oct 2016 21:37:43 +0200 Subject: [PATCH] e2-build: warn about left out deploy results in release mode Signed-off-by: Tobias Ulmer --- local/e2-build.lua | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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) -- 2.39.5