diff --git a/macosx/BuildBot/00_clean.sh b/macosx/BuildBot/00_clean.sh new file mode 100755 index 000000000..c537ae2cb --- /dev/null +++ b/macosx/BuildBot/00_clean.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Note: +# This script is meant to be run from the root of the working copy. +# +# This script cleans up warzone but not the libs so builds will go faster. + +# Config + +cd macosx + +xcodebuild -project Warzone.xcodeproj -parallelizeTargets -target "Warzone" -nodependencies Clean +exit ${?} diff --git a/macosx/BuildBot/01_configure.sh b/macosx/BuildBot/01_configure.sh new file mode 100755 index 000000000..127258f95 --- /dev/null +++ b/macosx/BuildBot/01_configure.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Note: +# This script is meant to be run from the root of the working copy. +# +# This just tries to build warzone. It does it twice because there are race conditions that may otherwise be triggered. + +# Config + +cd macosx + +if ! xcodebuild -project Warzone.xcodeproj -parallelizeTargets -target "Warzone" -configuration Release; then + if ! xcodebuild -project Warzone.xcodeproj -parallelizeTargets -target "Warzone" -configuration "Release" -PBXBuildsContinueAfterErrors=NO; then + exit ${?} + fi +fi + +exit 0 diff --git a/macosx/BuildBot/02_compile.sh b/macosx/BuildBot/02_compile.sh new file mode 100755 index 000000000..e4b1f0418 --- /dev/null +++ b/macosx/BuildBot/02_compile.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Note: +# This script is meant to be run from the root of the working copy. +# +# This script makes the actual .dmg and dSYM bundle. It is very important to keep the dSYM bundle with it's .dmg; it contains irreplaceable debug info (and, no another build even made right after will not work). + +# Config + +cd macosx + +xcodebuild -project Warzone.xcodeproj -parallelizeTargets -target "Make DMGs for Release" -configuration "Release" -PBXBuildsContinueAfterErrors=NO +exit ${?} diff --git a/macosx/BuildBot/03_upload.sh b/macosx/BuildBot/03_upload.sh new file mode 100755 index 000000000..e030e2e05 --- /dev/null +++ b/macosx/BuildBot/03_upload.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Note: +# This script is meant to be run from the root of the working copy. +# +# This script sets the name of the .dmg and dSYM bundle as it uploads them and does some link magic. + +# Config +uurl="buildbot@buildbot.pc-dummy.net" +rpth="public_html/" +lpth="macosx/build/dmgout/out/" +revt="-r`svnversion -n`" +dmg_bn="warzone2100" +dmg_nv="-novideo.dmg" +tar_dS="-dSYM.tar.gz" + + +# Set bran +if [ -z ${rtag} ]; then + echo "Must supply the branch name being built." + exit 1 +fi +bran="-${1} + + +# Upload the dSYM bundle +if ! scp -lpq 160 ${lpth}${dmg_bn}${tar_dS} ${uurl}:${rpth}${dmg_bn}${bran}${revt}${tar_dS}; then + exit ${?} +fi + +# Upload the .dmg +if ! scp -lpq 160 ${lpth}${dmg_bn}${dmg_nv} ${uurl}:${rpth}${dmg_bn}${bran}${revt}.dmg; then + exit ${?} +fi + + +# Link up the current .dmg and dSYM bundle +ssh ${uurl} -C "cd ${rpth} && ln -fs ${dmg_bn}${bran}${revt}.dmg ${dmg_bn}${bran}-current.dmg && ln -fs ${dmg_bn}${bran}${revt}${tar_dS} ${dmg_bn}${bran}-current${tar_dS}"