Files
love/platform/macosx/autobuild
T
2009-08-30 14:52:52 +02:00

54 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
cd ../..
# Check which revision to build.
if [ -z $2 ]; then
buildrev="tip"
else
buildrev=$2
fi
# Update to the appropriate revision.
hg pull
hg update $buildrev
# Set the displayversion.
if [ -z $3 ]; then
if [ "$buildrev" == "tip" ]; then
# Get the current SVN version, use sed to remove any non-numbers.
currentversion=`hg log -l1 | grep changeset | sed 's/.*://g'`
currentdate=`date +%Y%m%d`
displayversion="$currentdate-$currentversion"
else
# The revision is already specified, so we'll use that as the
# display version.
displayversion="$buildrev"
fi
else
# If the param is present, it overrides everything else.
displayversion=$3
fi
cd platform/macosx
outfile="love-$displayversion-macosx-ub"
outdmg="$outfile.dmg"
outlog="$outfile.log"
xcodebuild > $outlog 2>&1
cp love.dmg $outdmg
# Deal with uploading.
if [ "$1" == "build" ]; then
pass=`cat pwtehlol`
ftp -u ftp://tehloejc:$pass@tehlol.com/public_html/love2d/builds/$outdmg $outdmg
ftp -u ftp://tehloejc:$pass@tehlol.com/public_html/love2d/builds/$outlog $outlog
fi
if [ "$1" == "release" ]; then
echo "release"
fi