File dev-helper/tag-version.sh

Last commit: Tue Oct 20 00:52:38 2020 +0200	Jan Dankert	New: A build date in the Version class.
1 #!/bin/bash 2 # Setting a version number and commit to VCS. 3 # 4 VERSION=$1 5 SCRIPT=`basename "$0"` 6 CURRENT=`dirname "$0"` 7 OUTFILE=${CURRENT}/../modules/cms/base/Version.class.php 8 9 if [ -z "$VERSION" ]; then 10 echo "Usage: $0 <version>" 1>&2; 11 exit 1; 12 fi 13 14 15 function set_version { 16 VERSION=$1 17 DATE=$2 18 DATE_STR=$3 19 20 cat << EOF > $OUTFILE 21 <?php 22 // AUTO GENERATED. 23 // THIS FILE IS GENERATED BY $SCRIPT - DO NOT CHANGE. 24 namespace cms\base; 25 class Version { 26 const VERSION = '${VERSION}'; 27 const DATE = ${DATE}; 28 } 29 EOF 30 } 31 32 DATE=`date +%s` 33 34 set_version $VERSION $DATE 35 36 #git commit -m "New version tag $VERSION" $OUTFILE 37 #git tag $VERSION 38 39 set_version 'dev-snapshot' 'null' 40 41 #git commit -m "Setting development status" $OUTFILE
Download dev-helper/tag-version.sh
History Tue, 20 Oct 2020 00:52:38 +0200 Jan Dankert New: A build date in the Version class. Sat, 26 Sep 2020 13:11:23 +0200 Jan Dankert Refactoring: No global variables any more. All constants are capsulated by classes. Sat, 22 Aug 2020 02:27:48 +0200 Jan Dankert Recatoring: New script 'update.sh' for a more comfortable way to update the internal ui elements. Tue, 7 May 2019 23:43:27 +0200 Jan Dankert Fix: Setzen des Tags ohne '-a'. Tue, 7 May 2019 23:29:19 +0200 Jan Dankert Versionsnummer über eine version.php laden. Beim Setzen eines Git-Tags über ein Hilfsskript wird diese Datei angepasst.