1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/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://love2d:[email protected]/public_html/builds/files/$outdmg $outdmg
- ftp -u ftp://love2d:[email protected]/public_html/builds/files/$outlog $outlog
- fi
- if [ "$1" == "release" ]; then
- echo "release"
- fi
|