Browse Source

Added autobuilder for macosx.

rude 16 years ago
parent
commit
3ed03bf675
1 changed files with 53 additions and 0 deletions
  1. 53 0
      platform/macosx/autobuild

+ 53 - 0
platform/macosx/autobuild

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