summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredy <aluque@soleta.eu>2018-05-23 13:31:23 +0200
committerFredy <aluque@soleta.eu>2018-05-23 13:31:23 +0200
commitdeeec0020c646c25f5c25545b0bad85563b4ac8d (patch)
treee885e5956c5942d3ef24b43d291a358697d9c1d4
parent4295026394b7b59ff1a5b078c3395a02999509ee (diff)
#837 Timestamp in filename
-rwxr-xr-xinstaller/pkg-generator/genpkg.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/installer/pkg-generator/genpkg.sh b/installer/pkg-generator/genpkg.sh
index a6c50239..90f5be88 100755
--- a/installer/pkg-generator/genpkg.sh
+++ b/installer/pkg-generator/genpkg.sh
@@ -441,20 +441,21 @@ echo "Finished cleaning duplicated files"
local VERSIONFILE="$INSTALL_TARGET/doc/VERSION.txt"
[ -f $VERSIONFILE ] || echo "OpenGnsys Server" >$VERSIONFILE
local VERSION=$(cat $VERSIONFILE | awk '{print $2}')
-local REVISION=$(LANG=C svn info $SVNURL|awk '/Rev:/ {print "r"$4}')
+local REVISION=$(cat $VERSIONFILE | awk '{print $3}')
+local TIMESTAMP=`getDateTime`
local ARCH=$(grep Architecture $ROOTDIR/DEBIAN/control | awk '{print $2}')
echo -e "\n"
-echo "Version is: $VERSION Revision: $REVISION"
+echo "Version is: $VERSION Revision: $REVISION" Timestamp: $TIMESTAMP
echo -e "\n"
sed -ri "s/($| r[0-9]*)/ $REVISION/" $VERSIONFILE
-sed -ri "s/^Version\: VERSION/Version\: $VERSION$REVISION/" $ROOTDIR/DEBIAN/control
+sed -ri "s/^Version\: VERSION/Version\: $VERSION-$TIMESTAMP/" $ROOTDIR/DEBIAN/control
# Finally Generate package
cd $PKG_GEN_PATH
dpkg --build $PKG_NAME .
if [ $? = 0 ]; then
echo -e "\n"
- echo -e " Package Generated: ${PKG_GEN_PATH}/${PKG_NAME}_${VERSION}${REVISION}_${ARCH}.deb \n"
+ echo -e " Package Generated: ${PKG_GEN_PATH}/${PKG_NAME}_${VERSION}-${TIMESTAMP}_${ARCH}.deb \n"
echo -e "\n"
fi
}