create_tarball: Add package version into '.tdescminfo'.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit a810c4d292)
v3.5.13-sru
Slávek Banko 2 years ago
parent 33cafd4f12
commit 18cd831ec4

@ -134,10 +134,14 @@ tag=`git tag | \
count=`git log $tag --pretty=oneline | wc -l` 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 if [ "$SUFFIX" = "true" ]; then
package=$(basename $PWD)-trinity-$TARGET package=$(basename $PWD)-trinity-$pkgver
else else
package=trinity-$(basename $PWD)-$TARGET package=trinity-$(basename $PWD)-$pkgver
fi fi
if [ -z "$TDE_REBRAND" ]; then if [ -z "$TDE_REBRAND" ]; then
package=${package/tdeio-/kio-} package=${package/tdeio-/kio-}
@ -146,9 +150,6 @@ if [ -z "$TDE_REBRAND" ]; then
package=${package/tdm/kdm} package=${package/tdm/kdm}
package=${package/twin/kwin} package=${package/twin/kwin}
fi fi
if [[ "$count" -gt 0 ]] || [[ -z "$target_tag" ]]; then
package=$package~pre$count+$(git rev-parse HEAD | cut -c 1-8)
fi
# Create tarball # Create tarball
echo "Package name: $package" echo "Package name: $package"
@ -156,6 +157,7 @@ if [ ! -e $TARBALL_DIR/$package.tar$TAR_SUFFIX ]; then
echo "Creating tarball in $TARBALL_DIR." echo "Creating tarball in $TARBALL_DIR."
echo "# TDE SCM module information" > .tdescminfo echo "# TDE SCM module information" > .tdescminfo
echo "Name: $MODULE" >> .tdescminfo echo "Name: $MODULE" >> .tdescminfo
echo "Version: $pkgver" >> .tdescminfo
echo "Revision: $branch-$(git rev-parse HEAD)" >> .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 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 trap "rm $TARBALL_DIR/tar-$$; rm .tdescminfo; exit 1" INT

Loading…
Cancel
Save