You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2020/11/08 16:04:33 UTC

[isis-app-helloworld] branch master updated: simplifying CI

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis-app-helloworld.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b755a2  simplifying CI
8b755a2 is described below

commit 8b755a2128d70bb563ef5c8958d8185941902dd1
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Nov 8 16:04:20 2020 +0000

    simplifying CI
---
 .github/workflows/mavenJdk15.yml | 20 +++++++++-----------
 .github/workflows/mavenJdk8.yml  | 20 +++++++++-----------
 2 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/.github/workflows/mavenJdk15.yml b/.github/workflows/mavenJdk15.yml
index c107a46..cbf0845 100644
--- a/.github/workflows/mavenJdk15.yml
+++ b/.github/workflows/mavenJdk15.yml
@@ -16,15 +16,15 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2.3.3
-    
+
     - name: Set up JDK 15
       uses: actions/setup-java@v1
       with:
         java-version: 15
-    
+
     - name: Print Maven Version
       run: mvn --version
-      
+
     - name: Activate Cache for Maven Downloads
       uses: actions/cache@v2
       env:
@@ -39,19 +39,17 @@ jobs:
 
     - name: Prepare Build Versions
       shell: bash
-      env:
-        revision: 2.0.0-M2.20201011-0401-e11740f5
       run: |
-        mv pom.xml pom.xml~
-        mv pom-ci.xml pom.xml
-        #skip revision update (tends to use 2.0.0-M3 release instead of 2.0.0-M2 snapshots)
-        #mvn versions:update-parent -DallowSnapshots=true -DparentVersion=${{ env.revision }}
-        
+        BASELINE=$(cat pom.xml | grep "<version>" | head -1 | awk -F'>' '{print $2}' | awk -F'<' '{print $1}')
+        SHA_ID=$(echo $GITHUB_SHA | cut -c1-8)
+        REVISION=${BASELINE}.$(date +%Y%m%d-%H%M)-${SHA_ID}
+        mvn versions:set -DnewVersion=$REVISION
+
     - name: Print pom.xml
       shell: bash
       run: |
         cat pom.xml
-    
+
     - name: Build with Maven
       shell: bash
       run: |
diff --git a/.github/workflows/mavenJdk8.yml b/.github/workflows/mavenJdk8.yml
index fbb81cd..3c60960 100644
--- a/.github/workflows/mavenJdk8.yml
+++ b/.github/workflows/mavenJdk8.yml
@@ -16,15 +16,15 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2.3.3
-    
+
     - name: Set up JDK 1.8
       uses: actions/setup-java@v1
       with:
         java-version: 1.8
-    
+
     - name: Print Maven Version
       run: mvn --version
-      
+
     - name: Activate Cache for Maven Downloads
       uses: actions/cache@v2
       env:
@@ -39,19 +39,17 @@ jobs:
 
     - name: Prepare Build Versions
       shell: bash
-      env:
-        revision: 2.0.0-M2.20201011-0401-e11740f5
       run: |
-        mv pom.xml pom.xml~
-        mv pom-ci.xml pom.xml
-        #skip revision update (tends to use 2.0.0-M3 release instead of 2.0.0-M2 snapshots)
-        #mvn versions:update-parent -DallowSnapshots=true -DparentVersion=${{ env.revision }}
-        
+        BASELINE=$(cat pom.xml | grep "<version>" | head -1 | awk -F'>' '{print $2}' | awk -F'<' '{print $1}')
+        SHA_ID=$(echo $GITHUB_SHA | cut -c1-8)
+        REVISION=${BASELINE}.$(date +%Y%m%d-%H%M)-${SHA_ID}
+        mvn versions:set -DnewVersion=$REVISION
+
     - name: Print pom.xml
       shell: bash
       run: |
         cat pom.xml
-    
+
     - name: Build with Maven
       shell: bash
       run: |