mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-16 22:39:01 +00:00
build: allow rootfs builds w/o git or VERSION file deps
We set the VERSION variable consistently across Makefiles to 'unknown' if the file is empty or not present. We also use git commands consistently for calculating the COMMIT, COMMIT_NO variables, not erroring out when building outside of a git repository. In create_summary_file we also account for a missing/empty VERSION file. This makes e.g. the UVM build process in an environment where we build outside of git with a minimal/reduced set of files smoother. Signed-off-by: Manuel Huber <mahuber@microsoft.com>
This commit is contained in:
@@ -181,7 +181,8 @@ create_summary_file()
|
||||
[ "$AGENT_INIT" = yes ] && agent="${init}"
|
||||
|
||||
local -r agentdir="${script_dir}/../../../"
|
||||
local -r agent_version=$(cat ${agentdir}/VERSION)
|
||||
local agent_version=$(cat ${agentdir}/VERSION 2> /dev/null)
|
||||
[ -z "$agent_version" ] && agent_version="unknown"
|
||||
|
||||
cat >"$file"<<-EOF
|
||||
---
|
||||
|
Reference in New Issue
Block a user