Skip to content

Commit

Permalink
Update UI version in package.json to match Maven version during relea…
Browse files Browse the repository at this point in the history
…se (#1080)

Signed-off-by: Michael Edgar <medgar@redhat.com>
  • Loading branch information
MikeEdgar authored Oct 1, 2024
1 parent c2f354b commit d2f74e0
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 3 deletions.
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<module>common</module>
<module>api</module>
<module>operator</module>
<module>ui</module>
</modules>

<dependencyManagement>
Expand Down Expand Up @@ -240,7 +241,9 @@
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
<preparationProfiles>release-preparation</preparationProfiles>
<preparationGoals>verify</preparationGoals>
<completionGoals>process-resources -pl ui</completionGoals>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
<remoteTagging>false</remoteTagging>
Expand All @@ -250,4 +253,10 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release-preparation</id>
</profile>
</profiles>
</project>
4 changes: 2 additions & 2 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "console-ui",
"version": "0.1.0",
"version": "0.4.0-SNAPSHOT",
"license": "Apache-2.0",
"private": true,
"scripts": {
Expand Down
149 changes: 149 additions & 0 deletions ui/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.github.streamshub</groupId>
<artifactId>console</artifactId>
<version>0.4.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>console-ui</artifactId>

<properties>
<skip.npm-build>true</skip.npm-build>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.0</version>
<configuration>
<nodeVersion>v18.20.4</nodeVersion>
<installDirectory>${project.build.directory}</installDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install node and npm</id>
<phase>initialize</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<skip>${skip.npm-build}</skip>
<arguments>ci --omit=dev</arguments>
</configuration>
</execution>
<execution>
<id>npm build</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<skip>${skip.npm-build}</skip>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/META-INF/resources/</outputDirectory>
<resources>
<resource>
<directory>public</directory>
<targetPath>public</targetPath>
</resource>
<resource>
<directory>.next/standalone</directory>
<targetPath>.next/standalone</targetPath>
</resource>
<resource>
<directory>.next/static</directory>
<targetPath>.next/static</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release-preparation</id>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>npm set-version</id>
<goals>
<goal>npm</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<arguments>--no-git-tag-version version ${project.version}</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>git</executable>
<arguments>
<argument>add</argument>
<argument>package.json</argument>
<argument>package-lock.json</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit d2f74e0

Please sign in to comment.