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.
This commit is contained in:
Natanael Copa 2016-12-22 15:08:51 +00:00
parent f147132d14
commit 752bd10135

View File

@ -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)