|
161 | 161 | <property name="version-source" value="${src-working-dir}/Version.orig" /> |
162 | 162 | <property name="version-target" value="${src-working-dir}/Version.java" /> |
163 | 163 |
|
164 | | - <!-- Retrieves the current revision using the svn command. Contrary |
165 | | - to resolve-svn-revision, this removes the line separator at the end. --> |
166 | | - <target name="get-revision"> |
167 | | - <exec executable="svn" dir="${svn-working-dir}" failonerror="yes" output="svn-info.txt"> |
168 | | - <arg value="info" /> |
169 | | - </exec> |
170 | | - <loadfile property="REVSTAMP" srcfile="svn-info.txt"> |
171 | | - <filterchain> |
172 | | - <linecontains> |
173 | | - <contains value="Last Changed Rev: " /> |
174 | | - </linecontains> |
175 | | - <replacestring from="Last Changed Rev: " to="" /> |
176 | | - <striplinebreaks/> |
177 | | - </filterchain> |
178 | | - </loadfile> |
179 | | - <delete file="svn-info.txt" /> |
180 | | - <echo message="Revision is ${REVSTAMP}." /> |
181 | | - </target> |
182 | | - |
183 | 164 | <target name="generate-source" depends="resolve-development-value, resolve-version-tag" |
184 | 165 | description="Generate the CodeStatus and Version source files"> |
185 | 166 | <filter token="DEVELOPMENT" value="${development-value}" /> |
|
1084 | 1065 | <delete dir="${version-tag}" /> |
1085 | 1066 | </target> |
1086 | 1067 |
|
1087 | | - <target name="jar-app" depends="assert-jar-exists, resolve-version-tag"> |
| 1068 | + <target name="jar-app" depends="jar-14, assert-jar-exists, resolve-version-tag"> |
1088 | 1069 | <echo message="Creating ${version-tag}.jar" /> |
1089 | 1070 | <copy file="${ant.project.name}.jar" tofile="${version-tag}.jar" /> |
1090 | 1071 | </target> |
1091 | 1072 |
|
1092 | | - <target name="mac-app" depends="assert-jar-exists, resolve-version-tag"> |
| 1073 | + <target name="mac-app" depends="jar-14, assert-jar-exists, resolve-version-tag"> |
1093 | 1074 | <echo message="Creating ${version-tag}-osx.tar.gz" /> |
1094 | 1075 | <property name="mac-app-dir" value="${version-tag}/osx" /> |
1095 | 1076 | <mkdir dir="${mac-app-dir}" /> |
|
1109 | 1090 | </tar> |
1110 | 1091 | </target> |
1111 | 1092 |
|
1112 | | - <target name="windows-app" depends="assert-jar-exists, assert-launch4j-exists, resolve-version-tag"> |
| 1093 | + <target name="windows-app" depends="jar-14, assert-jar-exists, assert-launch4j-exists, resolve-version-tag"> |
1113 | 1094 | <!-- launch4j task, used to create the Windows executable --> |
1114 | | - <echo message="Creating ${version-tag}-windows.zip" /> |
| 1095 | + <echo message="Creating ${version-tag}.exe" /> |
1115 | 1096 | <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask"> |
1116 | 1097 | <classpath> |
1117 | 1098 | <pathelement location="${launch4j-home}/launch4j.jar" /> |
|
1126 | 1107 | </copy> |
1127 | 1108 | <copy file="${ant.project.name}.jar" todir="${windows-app-dir}" /> |
1128 | 1109 | <launch4j configfile="${windows-app-dir}/launch4j-config.xml" /> |
1129 | | - <zip destfile="${version-tag}-windows.zip" basedir="${windows-app-dir}" |
1130 | | - includes="${readable-project-name}.exe" /> |
1131 | 1110 | </target> |
1132 | 1111 |
|
1133 | 1112 | <target name="src-zip" depends="resolve-version-tag" unless="skip-tag"> |
|
1357 | 1336 | value="edu.rice.cs.plt.ant.OneLineJUnitResultFormatter" /> |
1358 | 1337 | </target> |
1359 | 1338 |
|
1360 | | - <target name="resolve-version-tag" depends="get-revision"> |
| 1339 | + <target name="resolve-version-tag" depends="resolve-svn-revision"> |
1361 | 1340 | <!-- Get a timestamp based on GMT, rather than local time --> |
1362 | 1341 | <tstamp> |
1363 | 1342 | <format property="DSTAMP" pattern="yyyyMMdd" timezone="GMT" /> |
1364 | 1343 | <format property="TSTAMP" pattern="HHmm" timezone="GMT" /> |
1365 | 1344 | <format property="TODAY" pattern="MMMM dd yyyy" timezone="GMT" /> |
1366 | 1345 | </tstamp> |
1367 | 1346 | <property name="version-tag" |
1368 | | - value="${ant.project.name}${tag-append}-${DSTAMP}-${TSTAMP}-r${REVSTAMP}" /> |
| 1347 | + value="${ant.project.name}${tag-append}-${DSTAMP}-r${svn-revision}" /> |
1369 | 1348 | </target> |
1370 | 1349 |
|
1371 | | - <!-- Sets is-modified if "svn status" has non-empty output. Runs svn in svn-working-dir. --> |
| 1350 | + <!-- Sets is-modified if "svn status" has non-empty output. --> |
1372 | 1351 | <target name="resolve-is-modified" depends="clean"> |
1373 | 1352 | <exec executable="svn" dir="${svn-working-dir}" failonerror="yes" outputproperty="svn-status"> |
1374 | 1353 | <arg value="status" /> |
|
1380 | 1359 | </condition> |
1381 | 1360 | </target> |
1382 | 1361 |
|
1383 | | - <!-- Sets svn-revision to the current "Last Changed Rev" of "svn info". Runs svn in svn-working-dir. --> |
| 1362 | + <!-- Sets svn-revision to the current "Last Changed Rev" of "svn info". --> |
1384 | 1363 | <target name="resolve-svn-revision"> |
1385 | 1364 | <exec executable="svn" dir="${svn-working-dir}" failonerror="yes" output="svn-info.txt"> |
1386 | 1365 | <arg value="info" /> |
|
1391 | 1370 | <contains value="Last Changed Rev: " /> |
1392 | 1371 | </linecontains> |
1393 | 1372 | <replacestring from="Last Changed Rev: " to="" /> |
| 1373 | + <striplinebreaks/> |
1394 | 1374 | </filterchain> |
1395 | 1375 | </loadfile> |
1396 | 1376 | <delete file="svn-info.txt" /> |
|
0 commit comments