Upgraded setversion.d to also run mvn clean test.

This commit is contained in:
Andrew Lalis 2022-07-09 11:31:20 +02:00
parent 9e8574ce21
commit c81da242ef
5 changed files with 8 additions and 4 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>ace-of-shades-2</artifactId>
<groupId>nl.andrewl</groupId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>ace-of-shades-2</artifactId>
<groupId>nl.andrewl</groupId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -7,7 +7,7 @@
<groupId>nl.andrewl</groupId>
<artifactId>ace-of-shades-2</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>
<modules>
<module>core</module>
<module>server</module>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>ace-of-shades-2</artifactId>
<groupId>nl.andrewl</groupId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -10,6 +10,7 @@ module setversion;
import std.stdio;
import std.file : write, readText;
import std.process;
void main() {
string newVersion = getMainVersion();
@ -20,6 +21,9 @@ void main() {
write(pomFile, xml);
writefln!"Updated %s to version %s"(pomFile, newVersion);
}
writeln("Running mvn clean test on updated projects.");
auto pid = spawnShell("mvn clean test", stdin, stdout, stderr);
wait(pid);
}
string getMainVersion() {