Skip to content

Commit

Permalink
feat: script to update the workshop Mutiny target version
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed Sep 10, 2023
1 parent f5705ff commit b4eb5ad
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .build/update-workshop-target-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
./mvnw -Pupdate-workshop-examples -f workshop-examples compile -DworkshopVersion=$1
find workshop-examples -name '*.java' | xargs chmod +x
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
<dokka.version>1.7.20</dokka.version>

<jandex-maven-plugin.version>1.2.3</jandex-maven-plugin.version>
<find-and-replace-maven-plugin.version>1.1.0</find-and-replace-maven-plugin.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -369,6 +370,11 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.floverfelt</groupId>
<artifactId>find-and-replace-maven-plugin</artifactId>
<version>${find-and-replace-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down
30 changes: 30 additions & 0 deletions workshop-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,34 @@
</plugins>
</build>

<profiles>
<profile>
<id>update-workshop-examples</id>
<build>
<plugins>
<plugin>
<groupId>io.github.floverfelt</groupId>
<artifactId>find-and-replace-maven-plugin</artifactId>
<executions>
<execution>
<id>exec</id>
<phase>process-sources</phase>
<goals>
<goal>find-and-replace</goal>
</goals>
<configuration>
<replacementType>file-contents</replacementType>
<findRegex>//DEPS io.smallrye.reactive:mutiny:.*</findRegex>
<replaceValue>//DEPS io.smallrye.reactive:mutiny:${workshopVersion}</replaceValue>
<recursive>true</recursive>
<fileMask>.java</fileMask>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public static void main(String[] args) throws InterruptedException {
.toMulti()
.subscribe().with(System.out::println);
}
}
}

0 comments on commit b4eb5ad

Please sign in to comment.