Changeset 2923


Ignore:
Timestamp:
Nov 15, 2006, 6:49:38 PM (16 years ago)
Author:
Jari Häkkinen
Message:

Version info in Application,java is now pushed from build.xml using ant.

Location:
branches/2.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/build.xml

    r2922 r2923  
    5353  <!-- set global properties for this build -->
    5454  <property name="compilerarg" value="-Xlint:unchecked" />
    55   <property name="base.version" value="2.1.1" />
    5655  <property environment="env" />
     56
     57  <!-- set BASE version
     58  Use numerical versions for bugix (maintenance) releases starting
     59  with "1". Use "0" for the first release of a new trunk version.  Add
     60  "pre" to unreleased versions.  Examples: 2.1.1pre, 2.1.1,
     61  2.1.2pre, 2.2.2, 2.2.0pre, 2.2.0, 2.2.1pre, 2.2.1 -->
     62  <property name="base.majorversion" value="2" />
     63  <property name="base.minorversion" value="1" />
     64  <property name="base.maintenanceversion" value="1pre" />
     65  <property name="base.version" value="${base.majorversion}.${base.minorversion}.${base.maintenanceversion}" />
    5766 
    5867  <property name="src" location="src" />
     
    266275    <replace
    267276      file="${core.src}/net/sf/basedb/core/Application.java"
     277      token="@MAJOR@"
     278      value="${base.majorversion}"
     279    />
     280    <replace
     281      file="${core.src}/net/sf/basedb/core/Application.java"
     282      token="@MINOR@"
     283      value="${base.minorversion}"
     284    />
     285    <replace
     286      file="${core.src}/net/sf/basedb/core/Application.java"
     287      token="@MAINTENANCE@"
     288      value="${base.maintenanceversion}"
     289    />
     290    <replace
     291      file="${core.src}/net/sf/basedb/core/Application.java"
    268292      token="@BUILD@"
    269293      value="${base.build}"
     
    775799      <export srcPath="." destPath="base-${base.version}-src" />
    776800    </svn>
     801    <replace
     802      file="base-${base.version}-src/src/core/net/sf/basedb/core/Application.java"
     803      token="@MAJOR@"
     804      value="${base.majorversion}"
     805    />
     806    <replace
     807      file="base-${base.version}-src/src/core/net/sf/basedb/core/Application.java"
     808      token="@MINOR@"
     809      value="${base.minorversion}"
     810    />
     811    <replace
     812      file="base-${base.version}-src/src/core/net/sf/basedb/core/Application.java"
     813      token="@MAINTENANCE@"
     814      value="${base.maintenanceversion}"
     815    />
    777816    <replace
    778817      file="base-${base.version}-src/src/core/net/sf/basedb/core/Application.java"
  • branches/2.1/src/core/net/sf/basedb/core/Application.java

    r2850 r2923  
    6161
    6262  /**
    63     The major version.
    64   */
    65   private static final int MAJOR_VERSION = 2;
    66  
    67   /**
    68     The minor version.
    69   */
    70   private static final int MINOR_VERSION = 1;
    71  
    72   /**
    73     The maintenance version. Use numerical versions for bugix releases
    74     starting with "1". Use "0" for the first release of a new trunk version.
    75     Add "beta" to unreleased versions.
    76     Examples:
    77     2.1.1beta, 2.1.1, 2.1.2beta, 2.2.2, 2.2.0beta, 2.2.0, 2.2.1beta, 2.2.1
    78   */
    79   private static final String MAINTENANCE_VERSION = "1beta";
     63    The major version. Set from 'ant'.
     64  */
     65  private static final String MAJOR_VERSION = "@MAJOR@";
     66 
     67  /**
     68    The minor version. Set from 'ant'.
     69  */
     70  private static final String MINOR_VERSION = "@MINOR@";
     71 
     72  /**
     73    The maintenance version. Set from 'ant'.
     74  */
     75  private static final String MAINTENANCE_VERSION = "@MAINTENANCE@";
    8076 
    8177  /**
     
    180176    Get the major version of Base.
    181177  */
    182   public static int getMajorVersion()
     178  public static String getMajorVersion()
    183179  {
    184180    return MAJOR_VERSION;
     
    188184    Get the minor version of Base.
    189185  */
    190   public static int getMinorVersion()
     186  public static String getMinorVersion()
    191187  {
    192188    return MINOR_VERSION;
Note: See TracChangeset for help on using the changeset viewer.