new way of versioning Sankore 3.1

preferencesAboutTextFull
Claudio Valerio 14 years ago
parent 2ae000e92c
commit edb9d897e7
  1. 22
      release.linux.sh
  2. 24
      release.macx.sh

@ -1,23 +1,27 @@
#!/bin/sh #!/bin/sh
SVN_REVISION=`svnversion`
# only accept up to date, non modified, non switched svn revisions
if echo $SVN_REVISION | grep -q [:MS]
then
echo "bad subversion revision ($SVN_REVISION)"
# exit 1
fi
make clean make clean
rm -rf build/linux/release/ rm -rf build/linux/release/
#/usr/local/Trolltech/Qt-4.6.1/bin/qmake
/usr/bin/qmake-qt4 /usr/bin/qmake-qt4
VERSION=`cat build/linux/release/version` VERSION=`cat build/linux/release/version`
if [ "$VERSION" = "" ]; then if [ "$VERSION" = "" ]; then
echo "version not found" echo "version not found"
exit 1 exit 1
else
LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`"
if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then
echo creating a tag with the version $VERSION
git tag -a "v$VERSION"
git push origin --tags
else
if [ "$1" != "escape" ] ; then
echo "if you have already compiled a release (e.g. on a different os) please use the fallowing command line"
echo sh release.linux.sh escape
exit 2
fi
fi
fi fi
make -j 4 release-install make -j 4 release-install

@ -69,16 +69,22 @@ QMAKE_CMD="$QMAKE -spec macx-g++42"
$QMAKE_CMD $QMAKE_CMD
VERSION=`cat "$BUILD_DIR/version"` VERSION=`cat "$BUILD_DIR/version"`
if [ "$VERSION" == "" ]; then if [ "$VERSION" = "" ]; then
abort "version not found" echo "version not found"
exit 1
else
LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`"
if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then
echo creating a tag with the version $VERSION
git tag -a "v$VERSION"
git push origin --tags
else
if [ "$1" != "escape" ] ; then
echo "if you have already compiled a release (e.g. on a different os) please use the fallowing command line"
echo sh release.macx.sh escape
exit 2
fi
fi fi
SVN_REVISION=`svnversion`
# only accept up to date, non modified, non switched svn revisions
if echo $SVN_REVISION | grep -q [:MS]
then
#warn "bad subversion revision ($SVN_REVISION)"
echo "bad subversion revision ($SVN_REVISION)"
fi fi
# build # build

Loading…
Cancel
Save