Skip to content

Commit

Permalink
Add ant task to automate pushing build result files to the gh-pages b…
Browse files Browse the repository at this point in the history
…ranch
  • Loading branch information
Jason Johnston committed Oct 8, 2011
1 parent 4119484 commit 2798bc5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,34 @@
<zip destfile="${build_dir}/PIE.zip" basedir="${build_dir}"/>
</target>



<target name="deploy" depends="build" description="Builds and pushes the files to the gh-pages branch">
<!-- Clone repo into temp dir, checking out the gh-pages branch -->
<exec executable="git">
<arg line="clone --reference . --branch gh-pages git@github.com:lojjic/PIE.git ${build_dir}/temp-git-clone" />
</exec>

<!-- Copy built files into correct version dir -->
<copy todir="${build_dir}/temp-git-clone/files/builds/${version}" overwrite="true">
<fileset file="${build_dir}/PIE.htc" />
<fileset file="${build_dir}/PIE_IE678.js" />
<fileset file="${build_dir}/PIE_IE9.js" />
<fileset file="${build_dir}/PIE_uncompressed.htc" />
<fileset file="${build_dir}/PIE_IE678_uncompressed.js" />
<fileset file="${build_dir}/PIE_IE9_uncompressed.js" />
</copy>

<!-- Commit and push -->
<exec executable="git" dir="${build_dir}/temp-git-clone">
<arg line='commit -a -m "Update files for build ${version}"' />
</exec>
<exec executable="git" dir="${build_dir}/temp-git-clone">
<arg line='push origin gh-pages' />
</exec>

<!-- Cleanup -->
<delete dir="${build_dir}/temp-git-clone" />
</target>

</project>

0 comments on commit 2798bc5

Please sign in to comment.