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-19 09:51:34 +0200
commit18cd831ec4a7b3e09d254e8e11fa5ecff2f46b8b (patch)
tree7cf373868c6c12de3c07857e6ead8d72dd20f13f
parent33cafd4f126b9a6a60653f620e9402f5a842ecaa (diff)
downloadscripts-v3.5.13-sru.tar.gz
scripts-v3.5.13-sru.zip
create_tarball: Add package version into '.tdescminfo'.v3.5.13-sru
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit a810c4d292629e8668538231691e4b6c4274fec8)
-rwxr-xr-xcreate_tarball12
1 files changed, 7 insertions, 5 deletions
diff --git a/create_tarball b/create_tarball
index f41535c..d122e17 100755
--- a/create_tarball
+++ b/create_tarball
@@ -134,10 +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
+ package=trinity-$(basename $PWD)-$pkgver
fi
if [ -z "$TDE_REBRAND" ]; then
package=${package/tdeio-/kio-}
@@ -146,9 +150,6 @@ if [ -z "$TDE_REBRAND" ]; then
package=${package/tdm/kdm}
package=${package/twin/kwin}
fi
-if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then
- package=$package~pre$count+$(git rev-parse HEAD | cut -c 1-8)
-fi
# Create tarball
echo "Package name: $package"
@@ -156,6 +157,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: $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