summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-03-12 20:41:24 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-03-23 17:45:04 +0100
commit6d5bbbe14bc8caa7a28c5d15c841f10e3aa53eef (patch)
treef961ebe7ee89206b6b9c4f1f956641c337d66f7b
parent9d96d333d30a130fa07f31f963ea705d429423d8 (diff)
downloadscripts-6d5bbbe14bc8caa7a28c5d15c841f10e3aa53eef.tar.gz
scripts-6d5bbbe14bc8caa7a28c5d15c841f10e3aa53eef.zip
create_tarball: Create one .tdescminfo file containing all the data,
including the git repository date, instead of individual .tdescm* files. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 5c39eb0954bf46dcb0df0bb0a9c4e20a48978f83)
-rwxr-xr-xcreate_tarball10
1 files 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