Skip to content

Instantly share code, notes, and snippets.

@webdevotion
Created July 12, 2011 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdevotion/1077715 to your computer and use it in GitHub Desktop.
Save webdevotion/1077715 to your computer and use it in GitHub Desktop.
Flash Builder Premium: release build, copy release to web folder, git add / commit / push
RAILS_APP=../../../my_rails_app/
<?xml version="1.0" encoding="UTF-8"?>
<project name="My Project" basedir="." default="push_to_ci_server">
<property file="build.properties"/>
<target name="build">
<echo>
Compiling using headless Flash Builder mode ( ant/release-build-from-cmd-line script )
</echo>
<exec executable="sh" failonerror="true">
<arg line="release-build-from-cmd-line"/>
</exec>
</target>
<target name="export_release_build">
<echo>Building release build</echo>
<fb.exportReleaseBuild project="Given Flash Builder Project" failonerror="true"/>
</target>
<target name="push_to_ci_server" depends="build">
<echo>
Copying release build to Rails app, adding it to git repo, pushing to CI server ...
</echo>
<copy file="../bin-release/main.swf" todir="${RAILS_APP}public/" overwrite="true"/>
<copy file="../bin-debug/libs/library.swf" todir="${RAILS_APP}public/libs/" overwrite="true"/>
<property name="main_swf" value="public/main.swf" />
<property name="library_swf" value="public/libs/library.swf" />
<sequential>
<echo message="update local repo"/>
<exec executable="git" dir="${RAILS_APP}">
<arg value="pull"/>
<arg value="origin"/>
<arg value="master"/>
</exec>
<echo message = "git add ${RAILS_APP}${main_swf}" />
<exec executable="git" dir="${RAILS_APP}">
<arg value="add"/>
<arg value="${main_swf}" />
</exec>
<echo message = "git add ${RAILS_APP}${library_swf}" />
<exec executable = "git" dir = "${RAILS_APP}">
<arg value="add"/>
<arg value="${library_swf}" />
</exec>
<exec executable="git" dir="${RAILS_APP}">
<arg value="commit"/>
<arg value="-m"/>
<arg value="Main.swf release build"/>
</exec>
<exec executable="git" dir="${RAILS_APP}">
<arg value="push"/>
<arg value="origin"/>
<arg value="master"/>
</exec>
</sequential>
</target>
</project>
WORKSPACE="$HOME/Documents/Adobe Flash Builder 4.5"
# works with either FlashBuilder.app or Eclipse.app
"/Applications/Adobe Flash Builder 4.5/Adobe Flash Builder 4.5.app/Contents/MacOS/Adobe Flash Builder 4.5" --launcher.suppressErrors -noSplash -application org.eclipse.ant.core.antRunner -data "$WORKSPACE" -file "$(pwd)/build.xml" export_release_build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment