Build date macro.

MacroBuild.getBuildDate() will return a string that contains build date in "%Y%m%d.%H%M" format.

MacroBuild.getBuildBranch() will return a string that contains current git branch.

MacroBuild.getCoreDate(directory: String) will return a string that contains the date of last commit in the Snipe server core git repository in "%Y%m%d.%H%M" format. You need to give the path to the Snipe server core git repository as an argument.

MacroBuild.getCoreBranch(directory: String) will return a string that contains the git branch of the Snipe server core. You need to give the path to the Snipe server core git repository as an argument.

MacroBuild.getCoreVersion(directory: String) will return a string that contains the current version of the Snipe server core. You need to give the path to the Snipe server core as an argument.

Full usage example:

static var u: UniServerTest;
static function main()
  {
    u = new UniServerTest();
    u.print("UniServerTest " +
      snipe.lib.MacroBuild.getBuildBranch() + "-" +
      snipe.lib.MacroBuild.getBuildDate());
    u.print("Snipe Core " +
      snipe.lib.MacroBuild.getCoreVersion('../../core') + "-" +
      snipe.lib.MacroBuild.getCoreBranch('../../core') + "-" +
      snipe.lib.MacroBuild.getCoreDate('../../core'));

    ...
  }