Skip to content

Commit

Permalink
Adding a gitignore, and making the build.xml use git version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
natebeck committed Jan 13, 2011
1 parent d16683f commit d0cee86
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
bin
build/build.properties
docs/downloads
lessons/Lesson1FlashDevelop/bin
26 changes: 21 additions & 5 deletions build/build.xml
Expand Up @@ -68,14 +68,30 @@ http://bugs.adobe.com/jira/browse/SDK-20449
<property name="mxmlc" value="${flexbindir}/mxmlc${binaryExtension}" />
<property name="adl" value="${flexbindir}/adl${binaryExtension}" />

<property environment="env" />
<property environment="env" />


<!-- Local classpath useed for custom tasks -->
<path id="localClasspath">
<fileset dir="${buildFilesDir}">
<include name="**/*.jar"/>
</fileset>
</path>

<target name="get-git-details" >
<exec executable="git" outputproperty="git.revision.long">
<arg value="rev-parse"/>
<arg value="HEAD"/>
</exec>

<exec executable="git" outputproperty="git.revision.short">
<arg value="rev-parse"/>
<arg value="--short"/>
<arg value="HEAD"/>
</exec>

<echo>Git Details -- ${git.revision.long} (${git.revision.short})</echo>
</target>

<target name="ensureValidEnvironment">
<condition property="buildPropertiesIsValid">
Expand Down Expand Up @@ -109,10 +125,10 @@ http://bugs.adobe.com/jira/browse/SDK-20449
</fail>
</target>

<target name="checkBuildServer" description="Checks if this is the build server">
<target name="checkBuildServer" depends="get-git-details" description="Checks if this is the build server">
<condition property="isBuildServer" value="false">
<and>
<!--<isset property="env.SVN_REVISION"/>-->
<isset property="git.revision.short"/>
<isset property="env.BUILD_NUMBER"/>
</and>
</condition>
Expand All @@ -121,14 +137,14 @@ http://bugs.adobe.com/jira/browse/SDK-20449
<target name="populateBuildVersion" description="Creates an updated BuildVersion.as"
depends="checkBuildServer" if="isBuildServer">

<!--<echo>Revision Number: ${env.SVN_REVISION}</echo>-->
<echo>Revision Number: ${git.revision.short}</echo>
<echo>Build Number: ${env.BUILD_NUMBER}</echo>

<copy file="${classesDir}/com/pblabs/engine/version/BuildVersion.as.templ"
tofile="${classesDir}/com/pblabs/engine/version/BuildVersion.as" overwrite="true" />

<replace file="${classesDir}/com/pblabs/engine/version/BuildVersion.as"
token="@buildNumber@" value="(ZaaBot build #${env.BUILD_NUMBER})" />
token="@buildNumber@" value="ZaaBuild #${env.BUILD_NUMBER} (${git.revision.short})" />
</target>

<target name="compile" description="Creates SWC and API docs." unless="isUpToDate" depends="printUpToDate,ensureValidEnvironment">
Expand Down

0 comments on commit d0cee86

Please sign in to comment.