From 5c39eb0954bf46dcb0df0bb0a9c4e20a48978f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 12 Mar 2020 20:41:24 +0100 Subject: create_tarball: Create one .tdescminfo file containing all the data, including the git repository date, instead of individual .tdescm* files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- create_tarball | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/create_tarball b/create_tarball index 3eef5a9..c65c5d2 100755 --- a/create_tarball +++ b/create_tarball @@ -144,14 +144,16 @@ fi echo "Package name: $package" if [ ! -e $TARBALL_DIR/$package.tar.$TAR_SUFFIX ]; then echo "Creating tarball in $TARBALL_DIR." - echo $MODULE > .tdescmmodule - echo $branch-$(git rev-parse HEAD) > .tdescmrevision - trap "rm $TARBALL_DIR/tar-$$; rm .tdescmmodule .tdescmrevision; exit 1" INT + echo "# TDE SCM module information" > .tdescminfo + echo "Name: $MODULE" >> .tdescminfo + echo "Revision: $branch-$(git rev-parse HEAD)" >> .tdescminfo + git log -1 --pretty=format:"DateTime: %cd%n" --date=format:"%m/%d/%Y %H:%M" >> .tdescminfo + trap "rm $TARBALL_DIR/tar-$$; rm .tdescminfo; exit 1" INT tar c --owner=root --group=users --exclude .git --exclude .gitmodules --transform "s|^\.\(/\|$\)|$package\1|" ./ | \ $COMPRESS -9 >$TARBALL_DIR/tar-$$ && \ mv $TARBALL_DIR/tar-$$ $TARBALL_DIR/$package.tar.$TAR_SUFFIX || \ rm $TARBALL_DIR/tar-$$ - rm .tdescmmodule .tdescmrevision + rm .tdescminfo else echo "Unchanged tarball in $TARBALL_DIR." exit 2 -- cgit v1.2.1