Skip to content

Commit

Permalink
build: add a task to update version number in MainController
Browse files Browse the repository at this point in the history
  • Loading branch information
staticssleever668 committed Apr 3, 2021
1 parent 8c31a4a commit e66f273
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<mkdir dir="${dir.release}/linux" />
</target>

<target name="compile" depends="clean">
<target name="compile" depends="clean,inject_version">
<javac classpathref="build.lib" srcdir="${build.src}" debug="${debug}" destdir="${build.dest}" encoding="UTF-8" />
</target>

Expand Down Expand Up @@ -111,6 +111,11 @@
</copy>
</target>

<target name="inject_version">
<echo message="Updating game version in src/bms/player/beatoraja/MainController.java to ${app.version}" />
<replaceregexp file="src/bms/player/beatoraja/MainController.java" match="beatoraja \d+(?:\.\d+)+" replace="beatoraja ${app.version}" />
</target>

<target name="make_zip">
<zip destfile="${dir.release.windows}/${zipname}_windows.zip" basedir="${dir.release.windows}" />
<zip destfile="${dir.release.linux}/${zipname}_linux.zip" basedir="${dir.release.linux}" />
Expand Down

0 comments on commit e66f273

Please sign in to comment.