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>2016-12-22 15:50:03 +0000
commit752bd10135e430259e3fe9bf11e69822210b3fcb (patch)
treec6e66578cfc908bbb87b82967933b905780c3df8 /scripts
parentf147132d146d8ef17d720ce1637905d9a56c35a2 (diff)
downloadaports-752bd10135e430259e3fe9bf11e69822210b3fcb.tar.bz2
aports-752bd10135e430259e3fe9bf11e69822210b3fcb.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.
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)