aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-12-22 15:08:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-01-27 12:01:16 +0100
commit921cf37c6680e0a8471350bb4ac31742fa60317b (patch)
treeb2276ee87555bb30168cf8635c758787d6b1f5ea /scripts
parenta6e10c80955fcf0ba6b8f1e563f97c195e702ebb (diff)
downloadaports-921cf37c6680e0a8471350bb4ac31742fa60317b.tar.bz2
aports-921cf37c6680e0a8471350bb4ac31742fa60317b.tar.xz
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. (cherry picked from commit 752bd10135e430259e3fe9bf11e69822210b3fcb)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkimage-yaml.sh16
1 files changed, 11 insertions, 5 deletions
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)