forked from github/server
new build scripts, new versioning system
This commit is contained in:
parent
da6a58aed5
commit
3d8d091207
11
s/build
11
s/build
|
@ -1,8 +1,5 @@
|
|||
#!/bin/sh
|
||||
ROOT=`pwd`
|
||||
while [ ! -d $ROOT/.git ]; do
|
||||
ROOT=`dirname $ROOT`
|
||||
done
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
[ -z "$BUILD" ] && BUILD=Debug
|
||||
if [ -z "$JOBS" ] ; then
|
||||
|
@ -37,7 +34,13 @@ git submodule update
|
|||
|
||||
echo "build eressea"
|
||||
cd $ROOT/$BUILD
|
||||
BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//')
|
||||
if [ "$BRANCH" == "master" ] ; then
|
||||
VERSION=$(git describe --match 'v*.*.*' --tags | sed 's/^v//')
|
||||
cmake -DERESSEA_VERSION="$VERSION" ..
|
||||
else
|
||||
REV=$(git rev-parse --short HEAD)
|
||||
cmake -DERESSEA_BUILDNO="$REV-$BUILD" ..
|
||||
fi
|
||||
make $MAKEOPTS && make test
|
||||
cd $OLDPWD
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
#!/bin/sh
|
||||
ROOT=$(pwd)
|
||||
while [ ! -d $ROOT/.git ]; do
|
||||
ROOT=$(dirname $ROOT)
|
||||
if [ "$ROOT" == "/" ; then
|
||||
echo "could not find root, are you in the git repository?"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
[ -z $BUILD ] && BUILD=Debug
|
||||
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
ROOT=$(pwd)
|
||||
while [ ! -d $ROOT/.git ]; do
|
||||
ROOT=$(dirname $ROOT)
|
||||
done
|
||||
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
[ -z $BUILD ] && BUILD=Debug ; export BUILD
|
||||
|
||||
if [ ! -e $ROOT/$BUILD ]; then
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef ERESSEA_VERSION
|
||||
// the version number, if it was not passed to make with -D
|
||||
#define ERESSEA_VERSION "3.10.0-devel"
|
||||
#define ERESSEA_VERSION "3.10.0"
|
||||
#endif
|
||||
|
||||
const char *eressea_version(void) {
|
||||
|
|
Loading…
Reference in New Issue