diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-07-10 09:32:17 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-07-19 07:26:17 +0000 |
commit | c9f8116412887e5082dc5163dbb43e4a964454c8 (patch) | |
tree | 0c2e533fcb6adaad1ea76e1aa8d3c3ff8ceea8b3 /scripts | |
parent | c52731a65f80ef557998bbc0b06b24f189a88724 (diff) | |
download | qbs-c9f8116412887e5082dc5163dbb43e4a964454c8.tar.gz |
Modify make-release-archive.sh to produce both archive types at once
This script is for OUR release process, and doesn't need to be more
general than that especially when wrapping such a small git command.
Also clean it up a bit make it properly exit on error.
Change-Id: I117a01b344f3afe6360e58b2408f352e33dde356
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--] | scripts/make-release-archives.sh (renamed from scripts/make-release-archive.sh) | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/make-release-archive.sh b/scripts/make-release-archives.sh index b554e78fe..747851610 100644..100755 --- a/scripts/make-release-archive.sh +++ b/scripts/make-release-archives.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e ############################################################################# ## @@ -39,11 +40,11 @@ ## ############################################################################# -test $# -eq 2 || { echo "Usage: $(basename $0) <archive format> <tag>" >&2; exit 1; } +test $# -eq 1 || { echo "Usage: $(basename "$0") <tag>" >&2; exit 1; } -format=${1} -tag=${2} +tag=${1} version=${tag#v} -dir_name=qbs-src-${version} +dir_name=dist/qbs-src-${version} -git archive --format=${format} --prefix=${dir_name}/ -o ${dir_name}.${format} ${tag} +git archive --format=tar.gz "--prefix=${dir_name}/" -o "${dir_name}.tar.gz" "${tag}" +git archive --format=zip "--prefix=${dir_name}/" -o "${dir_name}.zip" "${tag}" |