From 96265db0d36f2d049a9fdb79460733f8d96c9336 Mon Sep 17 00:00:00 2001 From: John Grimes Date: Fri, 1 Dec 2023 19:55:52 +1000 Subject: [PATCH] Use help:evaluate for extracting Maven properties --- .github/workflows/release.yml | 4 ++-- .github/workflows/site.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 266fa7bb1a..c531dc6cea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -156,10 +156,10 @@ jobs: restore-keys: r-packages-${{ runner.os }}- - name: Extract Spark version working-directory: lib/R - run: echo "SPARK_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "SPARK_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.sparkVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Extract Hadoop version working-directory: lib/R - run: echo "HADOOP_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "HADOOP_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.hadoopVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Cache Spark id: cache-spark uses: actions/cache@v2 diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 6fc11736a3..ed4b16458e 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -30,10 +30,10 @@ jobs: ${{ runner.os }}-maven- - name: Extract Spark version working-directory: lib/R - run: echo "SPARK_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "SPARK_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.sparkVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Extract Hadoop version working-directory: lib/R - run: echo "HADOOP_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "HADOOP_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.hadoopVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Cache Spark id: cache-spark uses: actions/cache@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 526168ee0f..10b624370a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -609,10 +609,10 @@ jobs: restore-keys: r-packages-${{ runner.os }}- - name: Extract Spark version working-directory: lib/R - run: echo "SPARK_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "SPARK_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.sparkVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Extract Hadoop version working-directory: lib/R - run: echo "HADOOP_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "HADOOP_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.hadoopVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Cache Spark id: cache-spark uses: actions/cache@v2 @@ -677,10 +677,10 @@ jobs: ${{ runner.os }}-maven- - name: Extract Spark version working-directory: lib/R - run: echo "SPARK_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "SPARK_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.sparkVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Extract Hadoop version working-directory: lib/R - run: echo "HADOOP_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml)" >> $GITHUB_ENV + run: echo "HADOOP_VERSION=$(mvn help:evaluate -Dexpression=pathling.Rapi.hadoopVersion -q -DforceStdout)" >> $GITHUB_ENV - name: Cache Spark id: cache-spark uses: actions/cache@v2