Commit bbc33858 authored by Carsten  Rose's avatar Carsten Rose
Browse files

NewVersion.md: update best practice to release new version.

setVersion.sh: new script which updates all version numbers in different documents.
parent db6f4abc
......@@ -3,7 +3,7 @@ Neuer Build
* snpashot: Wird ein Tag vergeben der mit 'v' beginnt, erzeugt das automatisch ein Build in 'snapshot' (w3.math.uzh.ch/qfq)
* nightly: Ein Commit in den den Masterbranch erzeugt automatisch in der Nacht ein 'nightly' Build (w3.math.uzh.ch/qfq)
* CR commmitet immer in den Master Branch
Neue Versionsnummer
===================
......@@ -13,20 +13,21 @@ Neue Versionsnummer
* git log | grep -v -e '^commit ' -e '^Author: ' -e '^Date: ' -e '^Merge: '| less
* qfq/extension/Documentation/Release.rst
* Den Inhalt von Release.txt kopieren nach qfq/extension/RELEASE.txt.
* Den Inhalt von Release.rst kopieren nach qfq/extension/RELEASE.txt.
2) In folgenden Files anpassen:
* extension/Documentation/_make/conf.py: release, version
* extension/Documentation/Settings.yml: version
* extension/ext_emconf.php: version
Auto: ./setVersion.sh MAJOR MINOR MICRO
Manuell:
* extension/Documentation/_make/conf.py: release, version
* extension/Documentation/Settings.yml: version
* extension/ext_emconf.php: version
3) Im Projektverzeichnis:
make t3sphinx (dadurch fallen Fehler in RESTdoc Syntax auf)
#4) Neues ZIP bauen: rm qfq.zip; make qfq.zip
5) Merge auf master Branch
# Alles einchecken ausser 'NewVersion.md': in phpStorm 'git commit'
......@@ -35,8 +36,8 @@ Neue Versionsnummer
git merge crose_work
6) Neuen Tag vergeben:
git tag 0.17.0
git push -u origin v0.16.10
git tag v0.17.0
git push -u origin v0.17.0
7) Alle Files, inkl. Tags, in GIT einchecken, u.a. NewVersion.md
......
#!/bin/bash
# extension/Documentation/_make/conf.py: release, version
# extension/Documentation/Settings.yml: version
# extension/ext_emconf.php: version
ST="'"
function confPy() {
FILE=extension/Documentation/_make/conf.py
sed -i -r 's/^\s*release\s*=.+$/release = '"'"$VERSION"'"'/g' ${FILE}
sed -i -r 's/^\s*version\s*=.+$/version = '"'"$SHORT"'"'/g' ${FILE}
}
function settingsYml() {
FILE="extension/Documentation/Settings.yml"
sed -i -r 's/^\s*version\s*:.+$/ version: '$VERSION'/g' ${FILE}
sed -i -r 's/^\s*release\s*:.+$/ release: '$VERSION'/g' ${FILE}
}
function extEmConf() {
FILE="extension/ext_emconf.php"
sed -i -r 's/^\s*'${ST}'version'${ST}'\s*=>.+$/ '${ST}'version'${ST}' => '${ST}${VERSION}${ST}'/g' ${FILE}
}
function myExit() {
[ ! -z "$2" ] && echo "$2"
exit $1
}
#==================================
MAJOR="$1"
MINOR="$2"
MICRO="$3"
[ -z "$MAJOR" -o -z "$MINOR" -o -z "$MICRO" ] && myExit 1 "Missing Version"
VERSION="$MAJOR.$MINOR.$MICRO"
SHORT="$MAJOR.$MINOR"
confPy
settingsYml
extEmConf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment