1
0
Fork 0

fix handling of enterprise tags

This commit is contained in:
Wilfried Goesgens 2016-11-15 15:30:25 +01:00
parent 1649b2cd59
commit 64b50e5816
1 changed files with 81 additions and 86 deletions

View File

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
set -e set -ex
SCRIPT_DIR=`dirname $0`
SRC_DIR="${SCRIPT_DIR}/../"
ENTERPRISE_SRC_DIR=${SRC_DIR}/enterprise
TAG=1 TAG=1
BOOK=1 BOOK=1
@ -7,15 +11,22 @@ BUILD=1
SWAGGER=1 SWAGGER=1
EXAMPLES=1 EXAMPLES=1
LINT=1 LINT=1
PARALLEL=8
if [ "$#" -lt 1 ]; then if [ "$#" -lt 1 ]; then
echo "usage: $0 <major>.<minor>.<revision>" echo "usage: $0 <major>.<minor>.<revision>"
exit 1 exit 1
fi fi
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
echo "$1" echo "$1"
case "$1" in case "$1" in
--parallel)
shift
PARALLEL=$1
shift
;;
--no-lint) --no-lint)
LINT=0 LINT=0
shift shift
@ -61,21 +72,25 @@ while [ "$#" -gt 0 ]; do
esac esac
done done
if [ -d ${ENTERPRISE_SRC_DIR} ]; then
echo "enterprise directory missing"
fi
if echo ${VERSION} | grep -q -- '-'; then if echo ${VERSION} | grep -q -- '-'; then
echo "${VERSION} mustn't contain minuses! " echo "${VERSION} mustn't contain minuses! "
exit 1 exit 1
fi fi
if git tag | grep -q "^v$VERSION$"; then if git tag | grep -q "^v$VERSION$"; then
echo "$0: version $VERSION already defined" echo "$0: version $VERSION already defined"
exit 1 exit 1
fi fi
if fgrep -q "v$VERSION" CHANGELOG; then if fgrep -q "v$VERSION" CHANGELOG; then
echo "version $VERSION defined in CHANGELOG" echo "version $VERSION defined in CHANGELOG"
else else
echo "$0: version $VERSION not defined in CHANGELOG" echo "$0: version $VERSION not defined in CHANGELOG"
exit 1 exit 1
fi fi
VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'` VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'`
@ -83,127 +98,107 @@ VERSION_MINOR=`echo $VERSION | awk -F. '{print $2}'`
VERSION_REVISION=`echo $VERSION | awk -F. '{print $3}'` VERSION_REVISION=`echo $VERSION | awk -F. '{print $3}'`
cat CMakeLists.txt \ cat CMakeLists.txt \
| sed -e "s~set(ARANGODB_VERSION_MAJOR.*~set(ARANGODB_VERSION_MAJOR \"$VERSION_MAJOR\")~" \ | sed -e "s~set(ARANGODB_VERSION_MAJOR.*~set(ARANGODB_VERSION_MAJOR \"$VERSION_MAJOR\")~" \
| sed -e "s~set(ARANGODB_VERSION_MINOR.*~set(ARANGODB_VERSION_MINOR \"$VERSION_MINOR\")~" \ | sed -e "s~set(ARANGODB_VERSION_MINOR.*~set(ARANGODB_VERSION_MINOR \"$VERSION_MINOR\")~" \
| sed -e "s~set(ARANGODB_VERSION_REVISION.*~set(ARANGODB_VERSION_REVISION \"$VERSION_REVISION\")~" \ | sed -e "s~set(ARANGODB_VERSION_REVISION.*~set(ARANGODB_VERSION_REVISION \"$VERSION_REVISION\")~" \
> CMakeLists.txt.tmp > CMakeLists.txt.tmp
mv CMakeLists.txt.tmp CMakeLists.txt mv CMakeLists.txt.tmp CMakeLists.txt
CMAKE_CONFIGURE="-DUSE_MAINTAINER_MODE=ON" CMAKE_CONFIGURE="-DUSE_MAINTAINER_MODE=ON"
if [ `uname` == "Darwin" ]; then if [ `uname` == "Darwin" ]; then
CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11" CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11"
fi
ENTERPRISE=0
if [ -d enterprise ]; then
ENTERPRISE=1
fi fi
if [ "$BUILD" != "0" ]; then if [ "$BUILD" != "0" ]; then
echo "COMPILING COMMUNITY" echo "COMPILING COMMUNITY"
if [ "$BUILD" == "1" ]; then
rm -rf build && mkdir build rm -rf build && mkdir build
fi
(
cd build
cmake .. ${CMAKE_CONFIGURE}
make clean_autogenerated_files
cmake .. ${CMAKE_CONFIGURE}
make -j 8
)
if [ "$ENTERPRISE" == "1" ]; then
echo "COMPILING ENTERPRISE"
if [ "$BUILD" == "1" ]; then
rm -rf build-enterprise && mkdir build-enterprise
fi
( (
cd build-enterprise cd build
cmake .. ${CMAKE_CONFIGURE} -DUSE_ENTERPRISE=ON cmake .. ${CMAKE_CONFIGURE}
make -j 8 make clean_autogenerated_files
cmake .. ${CMAKE_CONFIGURE}
make -j ${PARALLEL}
)
echo "COMPILING ENTERPRISE"
rm -rf build-enterprise && mkdir build-enterprise
(
cd build-enterprise
cmake .. ${CMAKE_CONFIGURE} -DUSE_ENTERPRISE=ON
make -j ${PARALLEL}
) )
fi
fi fi
if [ "$LINT" == "1" ]; then if [ "$LINT" == "1" ]; then
echo "LINTING" echo "LINTING"
./utils/jslint.sh ./utils/jslint.sh
fi fi
git add -f \ git add -f \
README \ README \
arangod/Aql/tokens.cpp \ arangod/Aql/tokens.cpp \
arangod/Aql/grammar.cpp \ arangod/Aql/grammar.cpp \
arangod/Aql/grammar.h \ arangod/Aql/grammar.h \
lib/V8/v8-json.cpp \ lib/V8/v8-json.cpp \
lib/Basics/voc-errors.h \ lib/Basics/voc-errors.h \
lib/Basics/voc-errors.cpp \ lib/Basics/voc-errors.cpp \
js/common/bootstrap/errors.js \ js/common/bootstrap/errors.js \
CMakeLists.txt CMakeLists.txt
if [ "$EXAMPLES" == "1" ]; then if [ "$EXAMPLES" == "1" ]; then
echo "EXAMPLES" echo "EXAMPLES"
./utils/generateExamples.sh ./utils/generateExamples.sh
fi fi
if [ "$SWAGGER" == "1" ]; then if [ "$SWAGGER" == "1" ]; then
echo "SWAGGER" echo "SWAGGER"
./utils/generateSwagger.sh ./utils/generateSwagger.sh
fi fi
echo "GRUNT" echo "GRUNT"
( (
cd js/apps/system/_admin/aardvark/APP cd js/apps/system/_admin/aardvark/APP
rm -rf node_modules rm -rf node_modules
npm install npm install
grunt deploy grunt deploy
) )
git add -f Documentation/Examples/*.generated git add -f Documentation/Examples/*.generated
if [ "$BOOK" == "1" ]; then if [ "$BOOK" == "1" ]; then
echo "DOCUMENTATION" echo "DOCUMENTATION"
(cd Documentation/Books; make) (cd Documentation/Books; make)
fi fi
case "$TAG" in case "$TAG" in
*-alpha*|*-beta*|devel) *-alpha*|*-beta*|devel)
;; ;;
*) *)
if test -f EXPERIMENTAL; then git rm -f EXPERIMENTAL; fi if test -f EXPERIMENTAL; then git rm -f EXPERIMENTAL; fi
;; ;;
esac esac
if [ "$TAG" == "1" ]; then if [ "$TAG" == "1" ]; then
echo "COMMIT" echo "COMMIT"
git commit -m "release version $VERSION" -a git commit -m "release version $VERSION" -a
git push git push
git tag "v$VERSION" git tag "v$VERSION"
git push --tags git push --tags
if [ "$ENTERPRISE" == "1" ]; then cd ${ENTERPRISE_SRC_DIR}
( git commit -m "release version $VERSION enterprise" -a
cd enterprise git push
git commit -m "release version $VERSION enterprise" -a
git push
git tag "v$VERSION" git tag "v$VERSION"
git push --tags git push --tags
)
fi
echo echo
echo "--------------------------------------------------" echo "--------------------------------------------------"
echo "Remember to update the VERSION in 'devel' as well." echo "Remember to update the VERSION in 'devel' as well."
echo "--------------------------------------------------" echo "--------------------------------------------------"
fi fi