From 752bd10135e430259e3fe9bf11e69822210b3fcb Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 22 Dec 2016 15:08:51 +0000 Subject: scripts/mkimage-yaml: fix branch we need get the branch from tag instead of git branch, because we generate releasecandidates and the first stable release from git master and only do the git branch after the release is done. --- scripts/mkimage-yaml.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/mkimage-yaml.sh b/scripts/mkimage-yaml.sh index 466ee88a75..de0161c666 100755 --- a/scripts/mkimage-yaml.sh +++ b/scripts/mkimage-yaml.sh @@ -23,14 +23,20 @@ done set -- $opt "$@" -releasedir="$branch/releases/$arch" if [ -z "$branch" ]; then - git_branch="$(git rev-parse --abbrev-ref HEAD)" - case "$git_branch" in - *-stable) branch=${git_branch%-stable};; - *) branch=edge;; + case "$release" in + *.*.*_alpha*|*.*.*_beta*) branch=edge;; + *.*.*) branch=${release%.*}; branch="v${branch#v}";; + *) + git_branch="$(git rev-parse --abbrev-ref HEAD)" + case "$git_branch" in + *-stable) branch=${git_branch%-stable};; + *) branch=edge;; + esac + ;; esac fi +releasedir="$branch/releases/$arch" [ -n "$arch" ] || arch=$(apk --print-arch) -- cgit v1.2.3