Add revision number template in order we can change revision numbers in version service.

cusax-fix
Damian Minkov 16 years ago
parent ece8405e6c
commit 32788f8e7c

@ -435,6 +435,15 @@
<!-- set the build id according to the cruisecontrol property -->
<replace file="${src}/net/java/sip/communicator/impl/version/NightlyBuildID.java"
token="build.id" value="${build.label}"/>
<!-- create a class that would contain our nightly revision.id if any -->
<copy file="${src}/net/java/sip/communicator/impl/version/RevisionID.java.tmpl"
tofile="${src}/net/java/sip/communicator/impl/version/RevisionID.java"
overwrite="true"/>
<!-- set the build id according to the cruisecontrol property -->
<replace file="${src}/net/java/sip/communicator/impl/version/RevisionID.java"
token="revision.id" value="${build.label}"/>
</target>
<!-- SIP Communicator Version -->

@ -0,0 +1,17 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.version;
/**
* This file is autoupdated by build.xml in order to set revision id.
*
* @author Damian Minkov
*/
public class RevisionID
{
public static final String REVISION_ID="0";
}

@ -0,0 +1,17 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.version;
/**
* This file is autoupdated by build.xml in order to set revision id.
*
* @author Damian Minkov
*/
public class RevisionID
{
public static final String REVISION_ID="revision.id";
}

@ -47,14 +47,6 @@ public class VersionImpl
*/
public static final String PRE_RELEASE_ID = "alpha3";
/**
* Returns the version revision number of the current SIP Communicator
* version. In an example 2.3.1 version string 1 is the revision number.
* The version revision number number changes after applying bug fixes and
* possible some small enhancements to a given SIP Communicator version.
*/
public static final int VERSION_REVISION = 0;
/**
* Indicates if this SIP Communicator version corresponds to a nightly build
* of a repository snapshot or to an official SIP Communicator release.
@ -119,7 +111,14 @@ public int getVersionRevision()
if(isPreRelease())
return -1;
return VERSION_REVISION;
try
{
return Integer.valueOf(RevisionID.REVISION_ID);
} catch (NumberFormatException numberFormatException)
{
// if we cannot parse the revision number return 0
return 0;
}
}
/**

Loading…
Cancel
Save