Skip to content

Commit

Permalink
FIX: forced version gets corrupted on creating a release
Browse files Browse the repository at this point in the history
  • Loading branch information
Flow86 committed Aug 22, 2017
1 parent 892f4df commit b995ff5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ def transformIntoStep(arch, wspwd) {
PARAMS=create_nightly
elif [ "${env.BRANCH_NAME}" == "stable" ] ; then
PARAMS=create_stable
COMMANDS='&& rm -f build_version_defines.h.force && make updateversion && sed -i -e "s/WINDOW_VERSION \\\"[0-9]*\\\"/WINDOW_VERSION \\\"\$(cat ../.stable-version)\\\"/g" build_version_defines.h && touch build_version_defines.h.force'
COMMANDS='&& rm -f build_version_defines.h.force && make updateversion && sed -i -e "s/WINDOW_VERSION \\\"[0-9]*\\\"/WINDOW_VERSION \\\"\$(cat ../.stable-version)\\\"/g" build_version_defines.h && touch build_version_defines.h.force && cat build_version_defines.h'
fi
docker run --rm -u jenkins -v \$(pwd):/workdir \
-v ~/.ssh:/home/jenkins/.ssh \
-v ~/.ccache:/workdir/.ccache \
\$VOLUMES \
--name "${env.BUILD_TAG}-${arch}" \
git.ra-doersch.de:5005/rttr/docker-precise:master -c \
"cd build && ./cmake.sh --prefix=. \$BARCH -DENABLE_WERROR=ON -DRTTR_USE_STATIC_BOOST=ON -DRTTR_PREFIX= \$COMMANDS && make \$PARAMS"
"cd build && ./cmake.sh --prefix=. \$BARCH -DRTTR_ENABLE_WERROR=ON -DRTTR_USE_STATIC_BOOST=ON -DRTTR_PREFIX= \$COMMANDS && make \$PARAMS"
EXIT=\$?
echo "Exiting with error code \$EXIT"
exit \$EXIT
Expand Down
8 changes: 8 additions & 0 deletions release/create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,16 @@ echo "Current version is: $VERSION-$REVISION"
echo "Savegame version: $SAVEGAMEVERSION"

unpackedPath=$ARCHNEWDIR/unpacked/s25rttr_$VERSION

# save build version
cp -v build_version_defines.h build_version_defines.h.bak

# Install into this folder
cmake . -DCMAKE_INSTALL_PREFIX="${unpackedPath}" || error

# restore build version, so that it stays definitly the same
cp -v build_version_defines.h.bak build_version_defines.h

make install || error
DESTDIR="${unpackedPath}" ./prepareRelease.sh
if [ ! $? = 0 ]; then
Expand Down

0 comments on commit b995ff5

Please sign in to comment.