}
title("Preparing RELEASE", releaseVersion);
version = releaseVersion;
releaseDate = buildDate;
releaseDateStr = buildDateStr;
replacements.add(new Substitute(Toolkit.Key.version.name(), releaseVersion));
replacements.add(new Substitute(Toolkit.Key.releaseVersion.name(), releaseVersion));
replacements.add(new Substitute(Toolkit.Key.releaseDate.name(), releaseDateStr));
updateDescriptor(replacements);
// update release log
properties.put(Toolkit.Key.name.projectId(), projectName);
properties.put(Toolkit.Key.version.projectId(), releaseVersion);
properties.put(Toolkit.Key.buildDate.projectId(), releaseDateStr);
properties.put(Toolkit.Key.releaseVersion.projectId(), releaseVersion);
properties.put(Toolkit.Key.releaseDate.projectId(), releaseDateStr);
updateReleaseLog(stage, releaseLog, properties);
break;
case snapshot:
// start a new minor version SNAPSHOT development cycle
if (artifactVersion.isSnapshot()) {
throw new MoxieException("The current version {0} is already a SNAPSHOT!", artifactVersion.toString());
}
artifactVersion.setSnapshot(true);
if (incrementNumber == null) {
// increment minor version, if unspecified
incrementNumber = NumberField.minor;
}
switch (incrementNumber) {
case major:
artifactVersion.incrementMajorVersion();
break;
case minor:
artifactVersion.incrementMinorVersion();
break;
case incremental:
artifactVersion.incrementIncrementalVersion();
break;
default:
artifactVersion.incrementMinorVersion();
break;
}
version = artifactVersion.toString();
title("Preparing SNAPSHOT", version);
replacements.add(new Substitute(Toolkit.Key.version.name(), version));
updateDescriptor(replacements);
// update release log
updateReleaseLog(stage, releaseLog, properties);
break;