[ofbiz-framework] branch release18.12 updated: Improved: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release18.12 updated: Improved: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new aecefda  Improved: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
aecefda is described below

commit aecefda2c6ec74cf1a956a24314ef0a233b26a62
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sun Apr 11 10:16:06 2021 +0200

    Improved: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
   
    The checksum part was missing in Windows init-gradle-wrapper.ps1 script
---
 gradle/init-gradle-wrapper.ps1 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gradle/init-gradle-wrapper.ps1 b/gradle/init-gradle-wrapper.ps1
index 5d6a8c9..d25bb2f 100644
--- a/gradle/init-gradle-wrapper.ps1
+++ b/gradle/init-gradle-wrapper.ps1
@@ -25,6 +25,14 @@ If ($ExecutionContext.SessionState.LanguageMode -eq "ConstrainedLanguage") {
     Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.jar https://github.com/gradle/gradle/raw/v5.0.0/gradle/wrapper/gradle-wrapper.jar
 }
 
+$expected = "1d23286bcb9e7d3debff18c1b892b9dbb9a4ec6c"
+$actual = (Get-FileHash gradle\wrapper\gradle-wrapper.jar -Algorithm SHA1).Hash.ToLower()
+@{$true = 'OK: Checksum match'; $false = "ERROR: Checksum mismatch!`nExpected: $expected`nActual: $actual"}[$actual -eq $expected]
+
+if (!$true) {
+    Remove-Item gradle\wrapper\gradle-wrapper.jar
+}
+
 #Write-Host $ExecutionContext.SessionState.LanguageMode
 
 Start-Sleep -s 3