[ofbiz-framework] branch trunk 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 trunk 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 trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


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

commit 391b3707610ce204725a61ceb2e7940babdf30dd
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sun Apr 11 10:00:01 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 1594786..a5cf90f 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/v6.5.1/gradle/wrapper/gradle-wrapper.jar
 }
 
+$expected = "33b0acb4572934fc1dd7d5880c65036724974e06"
+$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