There was an error while loading. Please reload this page.
1 parent 0394132 commit b9aab52Copy full SHA for b9aab52
1 file changed
.github/workflows/update-maven.yml
@@ -43,6 +43,10 @@ jobs:
43
run: |
44
MAJOR=$(echo "$VERSION" | cut -d. -f1)
45
SHA=$(curl -sL "https://downloads.apache.org/maven/maven-${MAJOR}/${VERSION}/binaries/apache-maven-${VERSION}-bin.zip.sha512")
46
+ if [[ ! "$SHA" =~ ^[0-9a-f]{128}$ ]]; then
47
+ echo "Error: invalid SHA-512 checksum downloaded for Maven ${VERSION}" >&2
48
+ exit 1
49
+ fi
50
PROPS=".mvn/wrapper/maven-wrapper.properties"
51
sed -i '/^distributionSha512Sum=/d' "$PROPS"
52
echo "distributionSha512Sum=${SHA}" >> "$PROPS"
0 commit comments