Commit 26557983 authored by halatmit's avatar halatmit

Change version to come from Git rather than Mercurial

parent b129f4fd
...@@ -162,6 +162,7 @@ ...@@ -162,6 +162,7 @@
<pathelement location="${local.build.dir}/AiSharedLib.jar" /> <pathelement location="${local.build.dir}/AiSharedLib.jar" />
<pathelement location="${build.dir}/common/CommonUtils.jar" /> <pathelement location="${build.dir}/common/CommonUtils.jar" />
<pathelement location="${build.dir}/common/CommonTestUtils.jar" /> <pathelement location="${build.dir}/common/CommonTestUtils.jar" />
<pathelement location="${build.dir}/common/CommonVersion.jar" />
<pathelement location="${build.dir}/components/CommonConstants.jar"/> <pathelement location="${build.dir}/components/CommonConstants.jar"/>
<pathelement location="${lib.dir}/guava/guava-10.0.1.jar" /> <pathelement location="${lib.dir}/guava/guava-10.0.1.jar" />
<pathelement location="${lib.dir}/json/json.jar" /> <pathelement location="${lib.dir}/json/json.jar" />
...@@ -190,7 +191,7 @@ ...@@ -190,7 +191,7 @@
</path> </path>
<target name="AiServerLibTests" <target name="AiServerLibTests"
depends="AiServerLib,common_CommonTestUtils,common_CommonUtils,Keystore" depends="AiServerLib,common_CommonTestUtils,common_CommonUtils,common_CommonVersion,Keystore"
description="build and run the test suite" > description="build and run the test suite" >
<ai.dojunit aij-testingtarget="AiServerLibTests" <ai.dojunit aij-testingtarget="AiServerLibTests"
aij-dir="${appinventor.pkg}/server" > aij-dir="${appinventor.pkg}/server" >
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
package com.google.appinventor.client; package com.google.appinventor.client;
import com.google.appinventor.client.utils.Urls; import com.google.appinventor.client.utils.Urls;
import com.google.appinventor.common.version.MercurialBuildId; import com.google.appinventor.common.version.GitBuildId;
/** /**
* Handles reporting of bugs in the ODE client code. * Handles reporting of bugs in the ODE client code.
...@@ -50,10 +50,11 @@ public final class BugReport { ...@@ -50,10 +50,11 @@ public final class BugReport {
String notes = Urls.escapeQueryParameter("Browser: " + getUserAgent() + "\n\n" + String notes = Urls.escapeQueryParameter("Browser: " + getUserAgent() + "\n\n" +
"Please attach a screenshot to help us fix the problem!\n\n" + "Please attach a screenshot to help us fix the problem!\n\n" +
"Steps to reproduce:\n"); "Steps to reproduce:\n");
String foundIn = Urls.escapeQueryParameter(MercurialBuildId.MERCURIAL_BUILD_ID); String foundIn = Urls.escapeQueryParameter(GitBuildId.getVersion());
return BUG_REPORT_FORM_LINK; return BUG_REPORT_FORM_LINK;
} }
/** /**
* Returns information regarding the user agent (aka browser). * Returns information regarding the user agent (aka browser).
......
...@@ -170,9 +170,9 @@ public interface OdeMessages extends Messages { ...@@ -170,9 +170,9 @@ public interface OdeMessages extends Messages {
// Used in StatusPanel.java // Used in StatusPanel.java
@DefaultMessage("Release Date: {0} Version: {1} Id: {2}") @DefaultMessage("Build date: {0} Version: {1}")
@Description("Label showing the Mercurial build id and build date") @Description("Label showing the ant build date and the git version")
String mercurialBuildId(String date, String version, String id); String gitBuildId(String date, String version);
@DefaultMessage("About") @DefaultMessage("About")
@Description("Label of the link for About") @Description("Label of the link for About")
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
package com.google.appinventor.client; package com.google.appinventor.client;
import static com.google.appinventor.client.Ode.MESSAGES; import static com.google.appinventor.client.Ode.MESSAGES;
import com.google.appinventor.common.version.MercurialBuildId; import com.google.appinventor.common.version.GitBuildId;
import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HTML;
...@@ -29,12 +29,11 @@ public class StatusPanel extends Composite { ...@@ -29,12 +29,11 @@ public class StatusPanel extends Composite {
hpanel.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT); hpanel.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
hpanel.add(new HTML(AppInventorFooter)); hpanel.add(new HTML(AppInventorFooter));
// This shows the id from mercurial hg id -i -n and the date of the build // This shows the git version and the date of the build
String version = MercurialBuildId.getVersion(); String version = GitBuildId.getVersion();
String id = MercurialBuildId.getId(); String date = GitBuildId.getDate();
String date = MercurialBuildId.getDate(); if (version != null && date != null) {
if (version != null && id != null && date != null) { Label buildId = new Label(MESSAGES.gitBuildId(date, version));
Label buildId = new Label(MESSAGES.mercurialBuildId(date, version, id));
hpanel.add(buildId); hpanel.add(buildId);
hpanel.setCellHorizontalAlignment(buildId, HorizontalPanel.ALIGN_RIGHT); hpanel.setCellHorizontalAlignment(buildId, HorizontalPanel.ALIGN_RIGHT);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
package com.google.appinventor.server; package com.google.appinventor.server;
import com.google.appinventor.common.version.MercurialBuildId; import com.google.appinventor.common.version.GitBuildId;
import com.google.appinventor.server.util.BuildData; import com.google.appinventor.server.util.BuildData;
import com.google.appengine.api.utils.SystemProperty; import com.google.appengine.api.utils.SystemProperty;
...@@ -77,7 +77,7 @@ public final class CrashReport { ...@@ -77,7 +77,7 @@ public final class CrashReport {
s.append("application.version").append("=").append(version).append("\n"); s.append("application.version").append("=").append(version).append("\n");
} }
s.append("build.version").append("=").append(buildData).append("\n"); s.append("build.version").append("=").append(buildData).append("\n");
s.append("mercurial.build.id").append("=").append(MercurialBuildId.MERCURIAL_BUILD_ID).append("\n"); s.append("git.build.version").append("=").append(GitBuildId.getVersion()).append("\n");
if (req != null) { if (req != null) {
s.append("request.details").append("=").append(req.toString()).append("\n"); s.append("request.details").append("=").append(req.toString()).append("\n");
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
package com.google.appinventor.server.project.utils; package com.google.appinventor.server.project.utils;
import com.google.appinventor.common.version.MercurialBuildId; import com.google.appinventor.common.version.GitBuildId;
import com.google.appinventor.server.encryption.EncryptionException; import com.google.appinventor.server.encryption.EncryptionException;
import com.google.appinventor.shared.rpc.ServerLayout; import com.google.appinventor.shared.rpc.ServerLayout;
import com.google.appinventor.shared.rpc.user.UserInfoProvider; import com.google.appinventor.shared.rpc.user.UserInfoProvider;
...@@ -23,7 +23,7 @@ public final class JavaWebStart { ...@@ -23,7 +23,7 @@ public final class JavaWebStart {
public final String userId; public final String userId;
public final long projectId; public final long projectId;
/** /**
* versionOk is true if the version specified in the project path matches the current Mercurial * versionOk is true if the version specified in the project path matches the current Git
* build version. * build version.
*/ */
public final boolean versionOk; public final boolean versionOk;
...@@ -68,12 +68,7 @@ public final class JavaWebStart { ...@@ -68,12 +68,7 @@ public final class JavaWebStart {
* Returns the version prefix used in the project path. * Returns the version prefix used in the project path.
*/ */
private static String getVersionPrefix() { private static String getVersionPrefix() {
String version = MercurialBuildId.getVersion(); return GitBuildId.getVersion();
// If there's a trailing +, remove it.
if (version.endsWith("+")) {
version = version.substring(0, version.length() - 1);
}
return version;
} }
/** /**
......
...@@ -5,7 +5,7 @@ package com.google.appinventor.server.project.youngandroid; ...@@ -5,7 +5,7 @@ package com.google.appinventor.server.project.youngandroid;
import com.google.appengine.api.utils.SystemProperty; import com.google.appengine.api.utils.SystemProperty;
import com.google.apphosting.api.ApiProxy; import com.google.apphosting.api.ApiProxy;
import com.google.appinventor.common.utils.StringUtils; import com.google.appinventor.common.utils.StringUtils;
import com.google.appinventor.common.version.MercurialBuildId; import com.google.appinventor.common.version.GitBuildId;
import com.google.appinventor.components.common.YaVersion; import com.google.appinventor.components.common.YaVersion;
import com.google.appinventor.server.CrashReport; import com.google.appinventor.server.CrashReport;
import com.google.appinventor.server.FileExporter; import com.google.appinventor.server.FileExporter;
...@@ -74,8 +74,8 @@ public final class YoungAndroidProjectService extends CommonProjectService { ...@@ -74,8 +74,8 @@ public final class YoungAndroidProjectService extends CommonProjectService {
private static final Logger LOG = Logger.getLogger(YoungAndroidProjectService.class.getName()); private static final Logger LOG = Logger.getLogger(YoungAndroidProjectService.class.getName());
// The value of this flag can be changed in appengine-web.xml // The value of this flag can be changed in appengine-web.xml
private static final Flag<Boolean> sendMercurialId = private static final Flag<Boolean> sendGitVersion =
Flag.createFlag("build.send.mercurial.id", true); Flag.createFlag("build.send.git.version", true);
// Project folder prefixes // Project folder prefixes
public static final String SRC_FOLDER = YoungAndroidSourceAnalyzer.SRC_FOLDER; public static final String SRC_FOLDER = YoungAndroidSourceAnalyzer.SRC_FOLDER;
...@@ -528,9 +528,9 @@ public final class YoungAndroidProjectService extends CommonProjectService { ...@@ -528,9 +528,9 @@ public final class YoungAndroidProjectService extends CommonProjectService {
throws UnsupportedEncodingException, EncryptionException { throws UnsupportedEncodingException, EncryptionException {
return "http://" + buildServerHost.get() + "/buildserver/build-all-from-zip-async" return "http://" + buildServerHost.get() + "/buildserver/build-all-from-zip-async"
+ "?uname=" + URLEncoder.encode(userName, "UTF-8") + "?uname=" + URLEncoder.encode(userName, "UTF-8")
+ (sendMercurialId.get() + (sendGitVersion.get()
? "&mercurialBuildId=" ? "&gitBuildVersion="
+ URLEncoder.encode(MercurialBuildId.MERCURIAL_BUILD_ID, "UTF-8") + URLEncoder.encode(GitBuildId.getVersion(), "UTF-8")
: "") : "")
+ "&callback=" + "&callback="
+ URLEncoder.encode("http://" + getCurrentHost() + ServerLayout.ODE_BASEURL_NOAUTH + URLEncoder.encode("http://" + getCurrentHost() + ServerLayout.ODE_BASEURL_NOAUTH
......
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
resource expensive on App Engine --> resource expensive on App Engine -->
<property name="motd.check.interval.secs" value="0" /> <property name="motd.check.interval.secs" value="0" />
<!-- Set this to false if we should not send our Mercurial build id with build requests. <!-- Set this to false if we should not send the Git build version with build requests.
This is useful when testing new servers where we don't want to require the This is useful when testing new servers where we don't want to require the
buildserver to match --> buildserver to match -->
<property name="build.send.mercurial.id" value="true" /> <property name="build.send.git.version" value="true" />
</system-properties> </system-properties>
......
...@@ -32,7 +32,7 @@ import org.w3c.dom.Element; ...@@ -32,7 +32,7 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import com.google.appinventor.common.version.MercurialBuildId; import com.google.appinventor.common.version.GitBuildId;
import openblocks.renderable.BlockNote; import openblocks.renderable.BlockNote;
import openblocks.renderable.BlockUtilities; import openblocks.renderable.BlockUtilities;
import openblocks.renderable.RenderableBlock; import openblocks.renderable.RenderableBlock;
...@@ -163,17 +163,16 @@ public class Workspace extends JLayeredPane ...@@ -163,17 +163,16 @@ public class Workspace extends JLayeredPane
explorerPanel.add(factory.getFactorySwitcher(), BorderLayout.NORTH); explorerPanel.add(factory.getFactorySwitcher(), BorderLayout.NORTH);
explorerPanel.add(factory.getJComponent(), BorderLayout.CENTER); explorerPanel.add(factory.getJComponent(), BorderLayout.CENTER);
// Show the Mercurial build id using a non-editable JTextField instead of a JLabel, so the user // Show the Git version using a non-editable JTextField instead of a JLabel, so the user
// can select and copy it. // can select and copy it.
JTextField mercurialBuildId = new JTextField("Version: " + MercurialBuildId.getVersion() + JTextField gitBuildId = new JTextField("Version: " + GitBuildId.getVersion());
" Id: " + MercurialBuildId.getId()); gitBuildId.setEditable(false);
mercurialBuildId.setEditable(false); gitBuildId.setBorder(null);
mercurialBuildId.setBorder(null); gitBuildId.setBackground(CGraphite.lightergreen);
mercurialBuildId.setBackground(CGraphite.lightergreen); gitBuildId.setForeground(Color.gray);
mercurialBuildId.setForeground(Color.gray); gitBuildId.setHorizontalAlignment(JTextField.CENTER);
mercurialBuildId.setHorizontalAlignment(JTextField.CENTER); gitBuildId.setFont(new Font("Arial", Font.PLAIN, 13));
mercurialBuildId.setFont(new Font("Arial", Font.PLAIN, 13)); explorerPanel.add(gitBuildId, BorderLayout.SOUTH);
explorerPanel.add(mercurialBuildId, BorderLayout.SOUTH);
blockCanvasLayer = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, blockCanvasLayer = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
explorerPanel, blockCanvas.getJComponent()); explorerPanel, blockCanvas.getJComponent());
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<!-- app engine libs --> <!-- app engine libs -->
<pathelement location="lib/appengine/appengine-java-sdk-1.6.2.1/lib/user/appengine-api-1.0-sdk-1.6.2.1.jar"/> <pathelement location="lib/appengine/appengine-java-sdk-1.6.2.1/lib/user/appengine-api-1.0-sdk-1.6.2.1.jar"/>
<pathelement location="lib/appengine/appengine-java-sdk-1.6.2.1/lib/user/orm/geronimo-jpa_3.0_spec-1.1.1.jar"/> <pathelement location="lib/appengine/appengine-java-sdk-1.6.2.1/lib/user/orm/geronimo-jpa_3.0_spec-1.1.1.jar"/>
<!-- prevent error importing MercurialBuildId if it has been generated --> <!-- prevent error importing GitBuildId if it has been generated -->
<pathelement location="common/build/classes/CommonVersion" /> <pathelement location="common/build/classes/CommonVersion" />
</classpath> </classpath>
<!-- Ignore non-standard tags used in blockslib. --> <!-- Ignore non-standard tags used in blockslib. -->
......
package com.google.appinventor.buildserver; package com.google.appinventor.buildserver;
import com.google.appinventor.common.version.MercurialBuildId; import com.google.appinventor.common.version.GitBuildId;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.io.ByteStreams; import com.google.common.io.ByteStreams;
import com.google.common.io.Files; import com.google.common.io.Files;
...@@ -157,8 +157,8 @@ public class BuildServer { ...@@ -157,8 +157,8 @@ public class BuildServer {
variables.put("vm-version", runtimeBean.getVmVersion()); variables.put("vm-version", runtimeBean.getVmVersion());
//BuildServer Version and Id //BuildServer Version and Id
variables.put("buildserver-version", MercurialBuildId.getVersion() + ""); variables.put("buildserver-version", GitBuildId.getVersion() + "");
variables.put("buildserver-id", MercurialBuildId.getId() + ""); variables.put("buildserver-git-fingerprint", GitBuildId.getFingerprint() + "");
// OS // OS
OperatingSystemMXBean osBean = ManagementFactory.getOperatingSystemMXBean(); OperatingSystemMXBean osBean = ManagementFactory.getOperatingSystemMXBean();
...@@ -297,8 +297,8 @@ public class BuildServer { ...@@ -297,8 +297,8 @@ public class BuildServer {
* files as well as the APK file if the build succeeded and the android.keystore file if it was * files as well as the APK file if the build succeeded and the android.keystore file if it was
* not provided in the input zip * not provided in the input zip
* *
* Before building the app, we'll check that the mercurialBuildId parameter (if present) equals * Before building the app, we'll check that the gitBuildVersion parameter (if present) equals
* MercurialBuildId.MERCURIAL_BUILD_ID. If the values are different, we won't even try to build * GitBuildId.getVersion(). If the values are different, we won't even try to build
* the app. This may seem too strict, but we need to make sure that when we build apps, we use * the app. This may seem too strict, but we need to make sure that when we build apps, we use
* the same version of the code that loads the .blk and .scm files, the same version of * the same version of the code that loads the .blk and .scm files, the same version of
* runtime.scm, and the same version of the App Inventor component classes. * runtime.scm, and the same version of the App Inventor component classes.
...@@ -307,7 +307,7 @@ public class BuildServer { ...@@ -307,7 +307,7 @@ public class BuildServer {
* as connection.getResponseCode(). * as connection.getResponseCode().
* *
* @param userName The user name to be used in making the CN entry in the generated keystore. * @param userName The user name to be used in making the CN entry in the generated keystore.
* @param mercurialBuildId The value of MercurialBuildId.MERCURIAL_BUILD_ID sent from * @param gitBuildVersion The value of GitBuildId.getVersion() sent from
* YoungAndroidProjectService.build. * YoungAndroidProjectService.build.
* @param callbackUrlStr An url to send the build results back to. * @param callbackUrlStr An url to send the build results back to.
* @param inputZipFile The zip file representing the App Inventor source code. * @param inputZipFile The zip file representing the App Inventor source code.
...@@ -318,7 +318,7 @@ public class BuildServer { ...@@ -318,7 +318,7 @@ public class BuildServer {
@Produces(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN)
public Response buildAllFromZipFileAsync(@QueryParam("uname") final String userName, public Response buildAllFromZipFileAsync(@QueryParam("uname") final String userName,
@QueryParam("callback") final String callbackUrlStr, @QueryParam("callback") final String callbackUrlStr,
@QueryParam("mercurialBuildId") final String mercurialBuildId, @QueryParam("gitBuildVersion") final String gitBuildVersion,
final File inputZipFile) throws IOException { final File inputZipFile) throws IOException {
// Set the inputZip field so we can delete the input zip file later in cleanUp. // Set the inputZip field so we can delete the input zip file later in cleanUp.
inputZip = inputZipFile; inputZip = inputZipFile;
...@@ -350,14 +350,14 @@ public class BuildServer { ...@@ -350,14 +350,14 @@ public class BuildServer {
asyncBuildRequests.incrementAndGet(); asyncBuildRequests.incrementAndGet();
if (mercurialBuildId != null && !mercurialBuildId.isEmpty()) { if (gitBuildVersion != null && !gitBuildVersion.isEmpty()) {
if (!mercurialBuildId.equals(MercurialBuildId.MERCURIAL_BUILD_ID)) { if (!gitBuildVersion.equals(GitBuildId.getVersion())) {
// This build server is not compatible with the App Inventor instance. Log this as severe // This build server is not compatible with the App Inventor instance. Log this as severe
// so the owner of the build server will know about it. // so the owner of the build server will know about it.
String errorMessage = "Build server version " + MercurialBuildId.MERCURIAL_BUILD_ID + String errorMessage = "Build server version " + GitBuildId.getVersion() +
" is not compatible with App Inventor version " + mercurialBuildId + "."; " is not compatible with App Inventor version " + gitBuildVersion + ".";
LOG.severe(errorMessage); LOG.severe(errorMessage);
// This request was rejected because the mercurialBuildId parameter did not equal the // This request was rejected because the gitBuildVersion parameter did not equal the
// expected value. // expected value.
rejectedAsyncBuildRequests.incrementAndGet(); rejectedAsyncBuildRequests.incrementAndGet();
cleanUp(); cleanUp();
...@@ -545,8 +545,8 @@ public class BuildServer { ...@@ -545,8 +545,8 @@ public class BuildServer {
int port = commandLineOptions.port; int port = commandLineOptions.port;
SelectorThread threadSelector = GrizzlyServerFactory.create("http://localhost:" + port + "/"); SelectorThread threadSelector = GrizzlyServerFactory.create("http://localhost:" + port + "/");
String hostAddress = InetAddress.getLocalHost().getHostAddress(); String hostAddress = InetAddress.getLocalHost().getHostAddress();
LOG.info("App Inventor Build Server - Version: " + MercurialBuildId.getVersion() + LOG.info("App Inventor Build Server - Version: " + GitBuildId.getVersion());
" Id: " + MercurialBuildId.getId()); LOG.info("App Inventor Build Server - Git Fingerprint: " + GitBuildId.getFingerprint());
LOG.info("Running at: http://" + hostAddress + ":" + port + "/buildserver"); LOG.info("Running at: http://" + hostAddress + ":" + port + "/buildserver");
if (commandLineOptions.maxSimultaneousBuilds == 0) { if (commandLineOptions.maxSimultaneousBuilds == 0) {
LOG.info("Maximum simultanous builds = unlimited!"); LOG.info("Maximum simultanous builds = unlimited!");
......
...@@ -3,34 +3,34 @@ ...@@ -3,34 +3,34 @@
package com.google.appinventor.common.version; package com.google.appinventor.common.version;
/** /**
* Class containing a constant for the Mercurial build id. * Class containing constants for the git version and fingerprint
* And another one for the Build date * and another one for the Ant Build date
*/ */
public final class MercurialBuildId { public final class GitBuildId {
// The following values are set during the ant build. // The following values are set during the ant build.
public static final String MERCURIAL_BUILD_ID = "@mercurial.version.id@"; public static final String GIT_BUILD_VERSION = "@git.build.version@";
public static final String GIT_BUILD_FINGERPRINT = "@git.build.fingerprint@";
public static final String ANT_BUILD_DATE = "@ant.build.date@"; public static final String ANT_BUILD_DATE = "@ant.build.date@";
private MercurialBuildId() { private GitBuildId() {
}
public static String getId() {
String[] idAndVersion = MERCURIAL_BUILD_ID.split("\\s+", 2);
if (idAndVersion.length == 2) {
return idAndVersion[0];
}
return null;
} }
public static String getVersion() { public static String getVersion() {
String[] idAndVersion = MERCURIAL_BUILD_ID.split("\\s+", 2); String version = GIT_BUILD_VERSION;
if (idAndVersion.length == 2) { // We can't use isEmpty() here because we want this to run
return idAndVersion[1]; // in jdk 1.5 for the Blocks Editor
if (version.equals("")) {
return "none" ;
} else {
return version;
} }
return null;
} }
public static String getFingerprint() {
return GIT_BUILD_FINGERPRINT;
}
public static String getDate() { public static String getDate() {
return ANT_BUILD_DATE; return ANT_BUILD_DATE;
} }
......
...@@ -92,17 +92,26 @@ ...@@ -92,17 +92,26 @@
<property name="CommonVersion-class.dir" location="${class.dir}/CommonVersion" /> <property name="CommonVersion-class.dir" location="${class.dir}/CommonVersion" />
<mkdir dir="${CommonVersion-class.dir}" /> <mkdir dir="${CommonVersion-class.dir}" />
<exec executable="hg" outputproperty="mercurial.version.id"> <!-- We extract two pieces of info from Git: the version and the fingerprint.
<arg line = "id -n -i " /> The version is the tag that was set in the release process. The fingerprint
by Git. We use the version or to check against the buildserver
version. We use the fingerprint only in the logs as an debugging aid. -->
<exec executable="git" outputproperty="git.build.version">
<arg line = "tag " />
</exec> </exec>
<filter token="mercurial.version.id" value="${mercurial.version.id}" /> <filter token="git.build.version" value="${git.build.version}" />
<exec executable="git" outputproperty="git.build.fingerprint">
<arg line = "rev-parse HEAD " />
</exec>
<filter token="git.build.fingerprint" value="${git.build.fingerprint}" />
<tstamp/> <tstamp/>
<property name="ant.build.date" value="${TODAY}" /> <property name="ant.build.date" value="${TODAY}" />
<filter token="ant.build.date" value="${ant.build.date}" /> <filter token="ant.build.date" value="${ant.build.date}" />
<mkdir dir="${local.build.dir}/src/${common.pkg}/version/"/> <mkdir dir="${local.build.dir}/src/${common.pkg}/version/"/>
<copy tofile="${local.build.dir}/src/${common.pkg}/version/MercurialBuildId.java" file="MercurialBuildId.template" filtering="true" /> <copy tofile="${local.build.dir}/src/${common.pkg}/version/GitBuildId.java" file="GitBuildId.template" filtering="true" />
<ai.javac5 destdir="${CommonVersion-class.dir}" srcdir="${src.dir};${local.build.dir}/src"> <ai.javac5 destdir="${CommonVersion-class.dir}" srcdir="${src.dir};${local.build.dir}/src">
<include name="${common.pkg}/version/*.java" /> <include name="${common.pkg}/version/*.java" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment