summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-06-17 14:16:35 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-06-17 14:28:10 +0200
commita810c4d292629e8668538231691e4b6c4274fec8 (patch)
treee4cd62ebc8c15d95ff543499b7fba747d3411b6e
parent1b670e287c807042997794e0344f1ae1c97b4d41 (diff)
downloadscripts-a810c4d292629e8668538231691e4b6c4274fec8.tar.gz
scripts-a810c4d292629e8668538231691e4b6c4274fec8.zip
create_tarball: Add package version into '.tdescminfo'.r14.1.0
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rwxr-xr-xcreate_tarball12
1 files changed, 7 insertions, 5 deletions
diff --git a/create_tarball b/create_tarball
index 166cf0d..b19dec6 100755
--- a/create_tarball
+++ b/create_tarball
@@ -134,13 +134,14 @@ tag=`git tag | \
count=`git log $tag --pretty=oneline | wc -l`
+pkgver=$TARGET
+if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then
+ pkgver=$pkgver~pre$count+$(git rev-parse HEAD | cut -c 1-8)
+fi
if [ "$SUFFIX" = "true" ]; then
- package=$(basename $PWD)-trinity-$TARGET
+ package=$(basename $PWD)-trinity-$pkgver
else
- package=trinity-$(basename $PWD)-$TARGET
-fi
-if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then
- package=$package~pre$count+$(git rev-parse HEAD | cut -c 1-8)
+ package=trinity-$(basename $PWD)-$pkgver
fi
# Create tarball
@@ -149,6 +150,7 @@ if [ ! -e $TARBALL_DIR/$package.tar$TAR_SUFFIX ]; then
echo "Creating tarball in $TARBALL_DIR."
echo "# TDE SCM module information" > .tdescminfo
echo "Name: $MODULE" >> .tdescminfo
+ echo "Version: R$pkgver" >> .tdescminfo
echo "Revision: $branch-$(git rev-parse HEAD)" >> .tdescminfo
date +"DateTime: %m/%d/%Y %H:%M" -u -d "@$(git log -1 --pretty=format:"%ct")" >> .tdescminfo
trap "rm $TARBALL_DIR/tar-$$; rm .tdescminfo; exit 1" INT