openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

commit 6594b70c60a406a81469fecb6bb5bc67891565d9
parent de69257fa7650a29c698ebaddad1f237a515a650
Author: Jan Dankert <develop@jandankert.de>
Date:   Tue,  7 May 2019 23:29:19 +0200

Versionsnummer über eine version.php laden. Beim Setzen eines Git-Tags über ein Hilfsskript wird diese Datei angepasst.

Diffstat:
build.ini | 5-----
dev-helper/tag-version.sh | 21+++++++++++++++++++++
modules/cms-core/Dispatcher.class.php | 2--
modules/cms-core/init.php | 2+-
modules/cms-core/version.php | 2++
version.ini | 5-----
6 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/build.ini b/build.ini @@ -1,5 +0,0 @@ -; auto-generated by /home/dankert/bin/openrat-increment-build - do not change -build=947 -date="Mon, 20 Nov 2017 23:45:58 +0100" -message="" -changeset= diff --git a/dev-helper/tag-version.sh b/dev-helper/tag-version.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# +VERSION=$1 + +if [ "$1" -eq "" ]; then + echo need version number + exit 4; +fi + +DATE=`date -R` +OUTFILE=../modules/cms-core/version.php + +echo "<?php DEFINE('OR_VERSION','$VERSION'); DEFINE('OR_DATE','$DATE');" > $OUTFILE + +git commit -m "New version tag $VERSION" $OUTFILE +git tag -a $VERSION + +echo "<?php DEFINE('OR_VERSION','dev-snapshot'); DEFINE('OR_DATE',date('r') );" > $OUTFILE + +git commit -m "Setting development status" $OUTFILE diff --git a/modules/cms-core/Dispatcher.class.php b/modules/cms-core/Dispatcher.class.php @@ -226,8 +226,6 @@ class Dispatcher $customConfig = $configLoader->load(); $conf = array_replace_recursive($conf, $customConfig); - $conf['build'] = parse_ini_file( __DIR__.'/../../build.ini'); - $conf['version'] = parse_ini_file( __DIR__.'/../../version.ini'); // Sprache lesen if ($conf['i18n']['use_http']) diff --git a/modules/cms-core/init.php b/modules/cms-core/init.php @@ -22,7 +22,7 @@ define('PHP_EXT' ,'php' ); define('IMG_EXT' ,'.gif' ); define('IMG_ICON_EXT' ,'.png' ); -define('OR_VERSION' ,'1.1-snapshot' ); +require(__DIR__.'/version.php'); define('OR_TITLE' ,'OpenRat CMS'); define('OR_TYPE_FOLDER','folder'); diff --git a/modules/cms-core/version.php b/modules/cms-core/version.php @@ -0,0 +1 @@ +<?php DEFINE('OR_VERSION','dev-snapshot'); DEFINE('OR_DATE',date('r') );+ \ No newline at end of file diff --git a/version.ini b/version.ini @@ -1,5 +0,0 @@ -rev="3757" -node="a7b818089994f1438d155929615eeb1df493271c" -date="Thu Nov 29 21:52:32 2018 +0100" -description="Das Löschen von Ordnern, Seiten, Links, URLs, Dateien, Bildern, Texten funktioniert jetzt wieder." -author="Jan Dankert"