Change version numbering
This commit is contained in:
parent
672b0f8102
commit
e8439d7b71
|
@ -8,7 +8,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<version>5.3.2</version>
|
<version>25.05.05</version>
|
||||||
<relativePath>../master</relativePath>
|
<relativePath>../master</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,7 @@ public class CamrecApplication extends Application {
|
||||||
LOG.debug("Creating GUI");
|
LOG.debug("Creating GUI");
|
||||||
DesktopIntegration.setRecorder(recorder);
|
DesktopIntegration.setRecorder(recorder);
|
||||||
DesktopIntegration.setPrimaryStage(primaryStage);
|
DesktopIntegration.setPrimaryStage(primaryStage);
|
||||||
CamrecApplication.title = "CTB Recorder " + Version.getVersion();
|
CamrecApplication.title = "CTB Recorder " + Version.getVersion().toDisplayString();
|
||||||
primaryStage.setTitle(title);
|
primaryStage.setTitle(title);
|
||||||
InputStream icon = getClass().getResourceAsStream("/icon.png");
|
InputStream icon = getClass().getResourceAsStream("/icon.png");
|
||||||
primaryStage.getIcons().add(new Image(icon));
|
primaryStage.getIcons().add(new Image(icon));
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<version>5.3.2</version>
|
<version>25.05.05</version>
|
||||||
<relativePath>../master</relativePath>
|
<relativePath>../master</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,11 @@ public class Version implements Comparable<Version> {
|
||||||
int revision = 0;
|
int revision = 0;
|
||||||
String designator = "";
|
String designator = "";
|
||||||
|
|
||||||
|
public String toDisplayString() {
|
||||||
|
return String.format("%02d.%02d.%02d", major, minor, revision) +
|
||||||
|
(designator.isEmpty() ? "" : "-" + designator);
|
||||||
|
}
|
||||||
|
|
||||||
public static Version of(String s) {
|
public static Version of(String s) {
|
||||||
Objects.requireNonNull(s, "Version string cannot be null");
|
Objects.requireNonNull(s, "Version string cannot be null");
|
||||||
Pattern p = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(?:-(.+))?");
|
Pattern p = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(?:-(.+))?");
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>5.3.2</version>
|
<version>25.05.05</version>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>../common</module>
|
<module>../common</module>
|
||||||
|
@ -49,6 +49,11 @@
|
||||||
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>versions-maven-plugin</artifactId>
|
||||||
|
<version>2.15.0</version>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ctbrec</groupId>
|
<groupId>ctbrec</groupId>
|
||||||
<artifactId>master</artifactId>
|
<artifactId>master</artifactId>
|
||||||
<version>5.3.2</version>
|
<version>25.05.05</version>
|
||||||
<relativePath>../master</relativePath>
|
<relativePath>../master</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Usage: ./update-version.sh 1.2.3
|
||||||
|
NEW_VERSION=$1
|
||||||
|
|
||||||
|
if [[ -z "$NEW_VERSION" ]]; then
|
||||||
|
echo "Usage: $0 <new-version>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
pushd master
|
||||||
|
|
||||||
|
echo "Updating Maven project version to $NEW_VERSION..."
|
||||||
|
|
||||||
|
# Step 1: Update the parent POM and all modules
|
||||||
|
mvn versions:set -DnewVersion="$NEW_VERSION"
|
||||||
|
|
||||||
|
# Step 2: Commit changes
|
||||||
|
mvn versions:commit
|
||||||
|
|
||||||
|
echo "Version updated to $NEW_VERSION in all modules."
|
||||||
|
|
||||||
|
popd
|
Loading…
Reference in New Issue