From c83fb0ffd0e0b468ca89c3a815ad05619f26d70d Mon Sep 17 00:00:00 2001 From: Simon Hausmann <simon.hausmann@digia.com> Date: Thu, 23 Jan 2014 10:24:10 +0100 Subject: [PATCH] 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: I8141b10d50bbf55a470d5a84ed0ae801742b57dc Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> --- tools/scripts/make_archive.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/scripts/make_archive.sh b/tools/scripts/make_archive.sh index 23b4c7f11..2db9a836c 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 -- GitLab