pkgs: image: Get image version from version.yaml

Build image with agent and osbuilder with master by default.

If want to build a release tag just use -v <version> and
will use that osbuilder and agent tag.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
Jose Carlos Venegas Munoz
2018-07-06 13:48:26 -05:00
parent 66e165a2f9
commit 6fa5b7945e
2 changed files with 107 additions and 44 deletions

View File

@@ -23,7 +23,6 @@ install_yq() {
# https://github.com/mikefarah/yq/releases/tag/<VERSION-HERE>
yq_version=$(basename "${yq_latest_url}")
local yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_linux_${goarch}"
curl -o "${yq_path}" -L "${yq_url}"
chmod +x "${yq_path}"
@@ -53,3 +52,12 @@ die() {
info() {
echo >&2 "INFO: $*"
}
get_repo_hash(){
local repo_dir=${1:-}
[ -d "${repo_dir}" ] || die "${repo_dir} is not a directory"
pushd "${repo_dir}" >> /dev/null
git rev-parse --verify HEAD
popd >> /dev/null
}