diff options
-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" |