mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Automatic commiting from the build script.
This commit is contained in:
1 parent
93596d8d46
commit
a0f02e7c9d
1 file changed
+29
-1
@@ -4,6 +4,19 @@
|
||||
<property file="build.properties" prefix="build"/>
|
||||
<property file="ftp.properties" prefix="ftp"/>
|
||||
|
||||
<macrodef name="git">
|
||||
<attribute name="command" />
|
||||
<attribute name="dir" default="" />
|
||||
<element name="args" optional="true" />
|
||||
<sequential>
|
||||
<echo message="git @{command}" />
|
||||
<exec executable="git" dir="@{dir}">
|
||||
<arg value="@{command}" />
|
||||
<args/>
|
||||
</exec>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${build.dir.gradle}\build\classes\main" />
|
||||
<delete dir="${build.dir.gradle}\src\main\java\vazkii" />
|
||||
@@ -16,7 +29,7 @@
|
||||
<entry key="build_number" type="int" operation="+" default="1"/>
|
||||
</propertyfile>
|
||||
<concat destfile="${build.dir.repo}\web\versions.ini" append="true" fixlastline="true">${line.separator}${build.version}-${build.build_number}=${build.mc_version}</concat>
|
||||
<echo file="${build.dir.repo}\versioning\${build.mc_version}.txt">${build.build_number}</echo>
|
||||
<echo file="${build.dir.repo}\version\${build.mc_version}.txt">${build.build_number}</echo>
|
||||
</target>
|
||||
|
||||
<target name="prep">
|
||||
@@ -73,6 +86,20 @@
|
||||
</ftp>
|
||||
</target>
|
||||
|
||||
<target name="commit_build">
|
||||
<git command="add">
|
||||
<args>
|
||||
<arg value="." />
|
||||
</args>
|
||||
</git>
|
||||
<git command="commit">
|
||||
<args>
|
||||
<arg value="-am Build ${build.build_number}" />
|
||||
</args>
|
||||
</git>
|
||||
<git command="push" />
|
||||
</target>
|
||||
|
||||
<target name="deploy_website">
|
||||
<ftp action="send" server="${ftp.host}" remotedir="/${build.mod_name}" userid="${ftp.user}" password="${ftp.pass}" verbose="yes" depends="yes">
|
||||
<fileset dir="${build.dir.repo}web" />
|
||||
@@ -88,5 +115,6 @@
|
||||
<antcall target="increment_build_number" />
|
||||
<antcall target="upload" />
|
||||
<antcall target="clean" />
|
||||
<antcall target="commit_build" />
|
||||
</target>
|
||||
</project>
|
||||
Reference in new issue
Block a user