From: Gordon Hecker Date: Fri, 4 Dec 2009 11:45:32 +0000 (+0100) Subject: git: verify that the project repository is on the tag matching the ReleaseId is clean... X-Git-Tag: e2factory-2.3.3rc1~3 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=59fc49d4cf9f98ff8b795a0eaef341fde1ad49d3;p=e2factory.git git: verify that the project repository is on the tag matching the ReleaseId is clean, i.e. no unknown files around, no differences against HEAD Signed-off-by: Gordon Hecker --- diff --git a/local/e2tool.lua b/local/e2tool.lua index e4f4736..53f205f 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -759,6 +759,28 @@ The newest configuration syntax supported by the tools is %s. if not rc then return false, e:cat(re) end + + if e2option.opts["check"] then + e2tool.lcd(info, ".") + rc, re = generic_git.verify_head_match_tag(nil, info.release_id) + if rc == nil then + e2lib.abort(e:cat(re)) + end + if not rc then + local msg = "project repository tag does not match the ReleaseId".. + " given in proj/config" + e:append(msg) + e2lib.abort(e:cat(re)) + end + rc, re = generic_git.verify_clean_repository(nil) + if rc == nil then + e2lib.abort(e:cat(re)) + end + if not rc then + e = new_error("project repository is not clean") + e2lib.abort(e:cat(re)) + end + end return info, nil end