diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-11-11 07:47:42 -0800 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-11-14 20:10:40 +0000 |
commit | 86da5a104758a199099eee1446f27cdd237754e1 (patch) | |
tree | d3e38c0164c81fb1b1739615fdcd876f5c4fae3b /scripts | |
parent | ac210c74ae7940ef3585ef498e3e3a00e66cb7b4 (diff) | |
download | aports-86da5a104758a199099eee1446f27cdd237754e1.tar.bz2 aports-86da5a104758a199099eee1446f27cdd237754e1.tar.xz |
scripts/mkimage: fix generation of version string
use git tag if we are at a given tag. use timestamp otherwise
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mkimage-yaml.sh | 6 | ||||
-rw-r--r-- | scripts/mkimage.sh | 11 |
2 files changed, 10 insertions, 7 deletions
diff --git a/scripts/mkimage-yaml.sh b/scripts/mkimage-yaml.sh index 0170f3ee00..466ee88a75 100755 --- a/scripts/mkimage-yaml.sh +++ b/scripts/mkimage-yaml.sh @@ -34,12 +34,6 @@ fi [ -n "$arch" ] || arch=$(apk --print-arch) -if [ -z "$release" ]; then - release=$(git describe --always) - if git describe --exact-match >/dev/null 2>&1; then - release=${release#v} - fi -fi for image; do filepath="$releasedir/${image##*/}" diff --git a/scripts/mkimage.sh b/scripts/mkimage.sh index 983a2ec47d..b8203fb205 100644 --- a/scripts/mkimage.sh +++ b/scripts/mkimage.sh @@ -29,7 +29,6 @@ _simulate="" _checksum="" OUTDIR="$PWD" -RELEASE="${build_date}" msg() { if [ -n "$quiet" ]; then return 0; fi @@ -208,6 +207,15 @@ while [ $# -gt 0 ]; do esac done +if [ -z "$RELEASE" ]; then + if git describe --exact-match >/dev/null 2>&1; then + RELEASE=$(git describe --always) + RELEASE=${RELEASE#v} + else + RELEASE="${build_date}" + fi +fi + # setup defaults if [ -z "$WORKDIR" ]; then WORKDIR="$(mktemp -d -t mkimage.XXXXXX)" @@ -253,3 +261,4 @@ for ARCH in $req_arch; do (build_profile) || exit 1 done done +echo "Images generated in $OUTDIR" |