Skip to content

Commit b9aab52

Browse files
review comments
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
1 parent 0394132 commit b9aab52

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/update-maven.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
run: |
4444
MAJOR=$(echo "$VERSION" | cut -d. -f1)
4545
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
4650
PROPS=".mvn/wrapper/maven-wrapper.properties"
4751
sed -i '/^distributionSha512Sum=/d' "$PROPS"
4852
echo "distributionSha512Sum=${SHA}" >> "$PROPS"

0 commit comments

Comments
 (0)