From 62ee6f64678e2064513707430c8afcba32f360ca Mon Sep 17 00:00:00 2001
From: querwurzel <>
Date: Tue, 7 Nov 2023 11:09:45 +0100
Subject: [PATCH] CI to handle versioning
---
.github/workflows/ci.yml | 9 +--
backend/pom.xml | 13 +++-
frontend/pom.xml | 152 ++++++++++++++++++++++-----------------
pom.xml | 13 +++-
4 files changed, 115 insertions(+), 72 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e21e9fb..926ce42 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,20 +38,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- mvn deploy -DskipTests -Drevision=1.0.${{ github.run_number }} -Denv=mysql
+ mvn versions:set -DnewVersion=1.0.${{ github.run_number }}
+ mvn -V deploy -DskipTests -Denv=mysql
- uses: actions/delete-package-versions@v4
with:
package-name: 'com.github.binpastes.app'
package-type: 'maven'
- min-versions-to-keep: 10
+ min-versions-to-keep: 3
- uses: actions/delete-package-versions@v4
with:
package-name: 'com.github.binpastes.frontend'
package-type: 'maven'
- min-versions-to-keep: 10
+ min-versions-to-keep: 3
- uses: actions/delete-package-versions@v4
with:
package-name: 'com.github.binpastes.backend'
package-type: 'maven'
- min-versions-to-keep: 10
+ min-versions-to-keep: 3
diff --git a/backend/pom.xml b/backend/pom.xml
index f4a6dc1..8889651 100644
--- a/backend/pom.xml
+++ b/backend/pom.xml
@@ -7,7 +7,7 @@
com.github.binpastes
app
- ${revision}
+ 0.0.1-SNAPSHOT
../pom.xml
@@ -17,7 +17,6 @@
com.github.binpastes
frontend
- ${revision}
@@ -102,6 +101,16 @@
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+
+ default-deploy
+ deploy
+
+
+
diff --git a/frontend/pom.xml b/frontend/pom.xml
index 3a53426..b197b1f 100644
--- a/frontend/pom.xml
+++ b/frontend/pom.xml
@@ -2,72 +2,96 @@
- 4.0.0
+ 4.0.0
-
- com.github.binpastes
- app
- ${revision}
- ../pom.xml
-
+
+ com.github.binpastes
+ app
+ 0.0.1-SNAPSHOT
+ ../pom.xml
+
- frontend
+ frontend
-
-
-
- com.github.eirslett
- frontend-maven-plugin
-
- v18.16.1
-
-
-
- install node and npm
-
- install-node-and-npm
-
-
-
- pnpm install
-
- npx
-
-
- pnpm install
-
-
-
- pnpm build
-
- npx
-
-
- pnpm run build
-
-
-
-
-
- maven-resources-plugin
-
-
- generate-resources
-
- resources
-
-
-
-
- dist
-
-
- ${project.build.outputDirectory}/static
-
-
-
-
-
-
+
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+
+ v18.18.2
+
+
+
+ install node and npm
+
+ install-node-and-npm
+
+
+
+ pnpm install
+
+ npx
+
+
+ pnpm install
+
+
+
+ pnpm build
+
+ npx
+
+
+ pnpm run build
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ default-test
+ none
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ default-compile
+ none
+
+
+ default-testCompile
+ none
+
+
+
+
+ maven-resources-plugin
+
+
+ generate-resources
+
+ resources
+
+
+
+
+ dist
+
+
+ ${project.build.outputDirectory}/static
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index fdddde7..b9ddcb7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
com.github.binpastes
app
- ${revision}
+ 0.0.1-SNAPSHOT
pom
BinPastes
@@ -31,7 +31,6 @@
UTF-8
- 1.0.0-SNAPSHOT
17
@@ -91,6 +90,16 @@
UTF-8
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+
+ default-deploy
+ none
+
+
+