diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-03-12 20:41:24 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-03-12 20:46:17 +0100 |
commit | 5c39eb0954bf46dcb0df0bb0a9c4e20a48978f83 (patch) | |
tree | f961ebe7ee89206b6b9c4f1f956641c337d66f7b | |
parent | 065e9e09364220849b982527aaba9494478fbb19 (diff) | |
download | scripts-5c39eb0954bf46dcb0df0bb0a9c4e20a48978f83.tar.gz scripts-5c39eb0954bf46dcb0df0bb0a9c4e20a48978f83.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>
-rwxr-xr-x | create_tarball | 10 |
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 |