mirror of
https://github.com/Mibew/CanteenHTML5.git
synced 2024-11-15 00:34:11 +03:00
Auto-add docs task
This commit is contained in:
parent
43d86ebdae
commit
f39dc4dcd8
@ -7,4 +7,7 @@ docs.description=Create dynamic, valid HTML5 markup with a simple an intuitive P
|
|||||||
docs.logo=
|
docs.logo=
|
||||||
docs.themedir=../CanteenTheme
|
docs.themedir=../CanteenTheme
|
||||||
docs.helpers=${docs.themedir}/path.js
|
docs.helpers=${docs.themedir}/path.js
|
||||||
|
git=git
|
||||||
|
git.docs=gh-pages
|
||||||
|
git.master=master
|
||||||
version=1.0.0
|
version=1.0.0
|
||||||
|
45
build.xml
45
build.xml
@ -23,6 +23,51 @@
|
|||||||
<delete file="temp.json" />
|
<delete file="temp.json" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="docsToGit" description="Auto-sync the docs to the Git docs branch">
|
||||||
|
<antcall target="docs" />
|
||||||
|
<delete dir="../${docs.outdir}" />
|
||||||
|
<copy todir="../${docs.outdir}">
|
||||||
|
<fileset dir="${docs.outdir}"/>
|
||||||
|
</copy>
|
||||||
|
<!-- Switch the branch -->
|
||||||
|
<exec executable="${git}" failonerror="true">
|
||||||
|
<arg line="checkout" />
|
||||||
|
<arg line="${git.docs}" />
|
||||||
|
</exec>
|
||||||
|
<delete includeEmptyDirs="true">
|
||||||
|
<fileset dir="." />
|
||||||
|
</delete>
|
||||||
|
<copy todir="./" overwrite="true">
|
||||||
|
<fileset dir="../${docs.outdir}" includes="**/*">
|
||||||
|
<depth max="3" />
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<delete dir="../${docs.outdir}" />
|
||||||
|
<!-- Add the files -->
|
||||||
|
<exec executable="${git}" failonerror="true">
|
||||||
|
<arg line="add" />
|
||||||
|
<arg line="-A" />
|
||||||
|
<arg line="." />
|
||||||
|
</exec>
|
||||||
|
<!-- Commit the files -->
|
||||||
|
<exec executable="${git}" failonerror="true">
|
||||||
|
<arg line="commit" />
|
||||||
|
<arg line="-m" />
|
||||||
|
<arg line='"Auto updated docs"' />
|
||||||
|
</exec>
|
||||||
|
<!-- Sync the files -->
|
||||||
|
<exec executable="${git}" failonerror="true">
|
||||||
|
<arg line="push" />
|
||||||
|
<arg line="origin" />
|
||||||
|
<arg line="${git.docs}" />
|
||||||
|
</exec>
|
||||||
|
<!-- Switch the branch back -->
|
||||||
|
<exec executable="${git}" failonerror="true">
|
||||||
|
<arg line="checkout" />
|
||||||
|
<arg line="${git.master}" />
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="clean" description="Remove all the YUIDocs">
|
<target name="clean" description="Remove all the YUIDocs">
|
||||||
<delete includeemptydirs="true">
|
<delete includeemptydirs="true">
|
||||||
<fileset dir="${docs.outdir}" includes="**/*" />
|
<fileset dir="${docs.outdir}" includes="**/*" />
|
||||||
|
Loading…
Reference in New Issue
Block a user