summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-01-23 10:24:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-27 13:12:12 +0100
commit6715ea16062caeaa582ba98add7e857bfc8b656b (patch)
tree0387f20ca7a8ba538e2d5075996e70d1fbb1b03d /tools
parente993a0b5d30524d28c5912b00af76d97dae1cc00 (diff)
Small fixes to the packaging script
* Add a .tag file to the archive that contains the sha1 the package was created from. This is useful for diagnostics. * Use bash and enforce error handling (it's easy to accidentally include bashisms) Change-Id: I217942da2e985772567da91a7635e5e81533ca95 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scripts/make_archive.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/scripts/make_archive.sh b/tools/scripts/make_archive.sh
index 23b4c7f1..2db9a836 100755
--- a/tools/scripts/make_archive.sh
+++ b/tools/scripts/make_archive.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#############################################################################
#
@@ -40,7 +40,7 @@
# $QT_END_LICENSE$
#
#############################################################################
-
+set -e
if [ $# -ne 2 ]; then
echo "Usage: $0 git-ref release-name"
@@ -61,5 +61,12 @@ git archive $THIRD_PARTY_REF --format tar --prefix=$RELEASE_NAME/src/3rdparty/ -
tar --concatenate --file=$OUTDIR/$RELEASE_NAME.tar $OUTDIR/$RELEASE_NAME.src.3rdparty.tar
rm $OUTDIR/$RELEASE_NAME.src.3rdparty.tar
+mkdir $RELEASE_NAME
+trap "{ rm -rf $RELEASE_NAME ; exit 255}" EXIT
+echo `git rev-parse $QTWEBENGINE_REF` > $RELEASE_NAME/.tag
+tar -r --file=$OUTDIR/$RELEASE_NAME.tar $RELEASE_NAME/.tag
+trap - EXIT
+rm -r $RELEASE_NAME
+
gzip $OUTDIR/$RELEASE_NAME.tar