You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/10/12 20:30:48 UTC
(maven-gh-actions-shared) 03/05: Keep the Maven archive on a Unix-style path for tar on Windows
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch v5
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git
commit a1b63e1dbefaa500b4623e1499cd461394bc80ab
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Mon Oct 12 09:32:52 2026 +0000
Keep the Maven archive on a Unix-style path for tar on Windows
---
.github/workflows/maven-verify.yml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index eab7db5..3457dc6 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -362,13 +362,15 @@ jobs:
MAVEN_VERSION: ${{ needs.setup-maven-version.outputs.version }}
run: |
url="https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz"
- archive="$RUNNER_TEMP/apache-maven-$MAVEN_VERSION-bin.tar.gz"
+ # a Unix-style path: tar in Git Bash on Windows takes "D:" in $RUNNER_TEMP for a remote host
+ mkdir -p ~/.m2/dists
+ archive="$HOME/.m2/dists/apache-maven-$MAVEN_VERSION-bin.tar.gz"
curl --fail --silent --show-error --location --retry 5 --retry-all-errors --output "$archive" "$url"
expected="$(curl --fail --silent --show-error --location --retry 5 --retry-all-errors "$url.sha512" | cut -d ' ' -f 1)"
actual="$(openssl dgst -sha512 -r "$archive" | cut -d ' ' -f 1)"
[ "$expected" = "$actual" ] || { echo "::error::SHA-512 mismatch for $url"; exit 1; }
- mkdir -p ~/.m2/dists
tar -xzf "$archive" -C ~/.m2/dists
+ rm "$archive"
- name: Set up Maven
if: steps.runner-maven.outputs.matches != 'true'
@@ -539,13 +541,15 @@ jobs:
MAVEN_VERSION: ${{ matrix.maven }}
run: |
url="https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz"
- archive="$RUNNER_TEMP/apache-maven-$MAVEN_VERSION-bin.tar.gz"
+ # a Unix-style path: tar in Git Bash on Windows takes "D:" in $RUNNER_TEMP for a remote host
+ mkdir -p ~/.m2/dists
+ archive="$HOME/.m2/dists/apache-maven-$MAVEN_VERSION-bin.tar.gz"
curl --fail --silent --show-error --location --retry 5 --retry-all-errors --output "$archive" "$url"
expected="$(curl --fail --silent --show-error --location --retry 5 --retry-all-errors "$url.sha512" | cut -d ' ' -f 1)"
actual="$(openssl dgst -sha512 -r "$archive" | cut -d ' ' -f 1)"
[ "$expected" = "$actual" ] || { echo "::error::SHA-512 mismatch for $url"; exit 1; }
- mkdir -p ~/.m2/dists
tar -xzf "$archive" -C ~/.m2/dists
+ rm "$archive"
- name: Set up Maven
if: steps.should-run.conclusion == 'success' && steps.runner-maven.outputs.matches != 'true'