Author: nmalin
Date: Tue Aug 20 16:26:38 2019 New Revision: 1865546 URL: http://svn.apache.org/viewvc?rev=1865546&view=rev Log: Improved: update init-gradle-wrapper.sh to load gradlew script When you run 'sh gradle/init-gradle-wrapper.sh', if the script gradlew at the OFBiz root isn't present we download it from bintray. I also update shasum fingerprint for gradle-wrapper.jar and gradle-wrapper.properties related to 16.10 release. Modified: ofbiz/branches/release16.11/gradle/init-gradle-wrapper.ps1 ofbiz/branches/release16.11/gradle/init-gradle-wrapper.sh Modified: ofbiz/branches/release16.11/gradle/init-gradle-wrapper.ps1 URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/gradle/init-gradle-wrapper.ps1?rev=1865546&r1=1865545&r2=1865546&view=diff ============================================================================== --- ofbiz/branches/release16.11/gradle/init-gradle-wrapper.ps1 (original) +++ ofbiz/branches/release16.11/gradle/init-gradle-wrapper.ps1 Tue Aug 20 16:26:38 2019 @@ -25,4 +25,5 @@ if ((Test-Path -Path ((Get-Item -Path ". # Anyway I believe this should be only used in dev environment wget -outf gradle\wrapper\gradle-wrapper.jar http://dl.bintray.com/apacheofbiz/GradleWrapper/v2.13/gradle-wrapper.jar wget -outf gradle\wrapper\gradle-wrapper.properties http://dl.bintray.com/apacheofbiz/GradleWrapper/v2.13/gradle-wrapper.properties +wget -outf gradle\wrapper\gradlew.bat http://dl.bintray.com/apacheofbiz/GradleWrapper/v2.13/gradlew.bat Modified: ofbiz/branches/release16.11/gradle/init-gradle-wrapper.sh URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/gradle/init-gradle-wrapper.sh?rev=1865546&r1=1865545&r2=1865546&view=diff ============================================================================== --- ofbiz/branches/release16.11/gradle/init-gradle-wrapper.sh (original) +++ ofbiz/branches/release16.11/gradle/init-gradle-wrapper.sh Tue Aug 20 16:26:38 2019 @@ -27,12 +27,14 @@ GRADLE_WRAPPER_URI="https://dl.bintray.c GRADLE_WRAPPER_URI_BACKUP="https://github.com/gradle/gradle/raw/v$RELEASE/gradle/wrapper/" # Embded checksum shasum to control the download -SHASUM_GRADLE_WRAPPER_FILES="12478d9829998a5433231ad971bae52978279a3d gradle/wrapper/gradle-wrapper.jar -05d4ab69d3f2143e017710b0917b740f75a75c07 gradle/wrapper/gradle-wrapper.properties" +SHASUM_GRADLE_WRAPPER_FILES="1d7e78262e0da9bbc9afe401fb000607a4dec5e5 gradle/wrapper/gradle-wrapper.jar +9d35a70e249236902a8abeb155c64d66c0b16294 gradle/wrapper/gradle-wrapper.properties +6019961ecd5de0e0513ae39a2e97e73c7eaa8fc9 gradlew" GRADLE_WRAPPER_JAR="gradle-wrapper.jar" GRADLE_WRAPPER_PROPERTIES="gradle-wrapper.properties" GRADLE_WRAPPER_FILES="$GRADLE_WRAPPER_JAR $GRADLE_WRAPPER_PROPERTIES" +GRADLE_WRAPPER_SCRIPT="gradlew" whereIsBinary() { whereis $1 | grep / @@ -69,6 +71,9 @@ if [ ! -d "$GRADLE_OFBIZ_PATH" ]; then echo "Location seems to be uncorrected, please take care to run 'sh gradle/init-gradle-wrapper.sh' at the Apache OFBiz home"; exit 1; fi +if [ ! -d "$GRADLE_WRAPPER_OFBIZ_PATH" ]; then + mkdir $GRADLE_WRAPPER_OFBIZ_PATH; +fi # check if we have on binary to download missing wrapper if [ -z "$(whereIsBinary curl)" ] && [ -z "$(whereIsBinary wget)" ]; then @@ -87,6 +92,14 @@ if [ ! -r "$GRADLE_WRAPPER_OFBIZ_PATH/$G rm -f $GRADLE_WRAPPER_OFBIZ_PATH/* echo "\nDownload files $GRADLE_WRAPPER_FILES from $GRADLE_WRAPPER_URI failed.\nPlease check the log to found the reason and run the script again." fi + + if [ ! -r "$GRADLE_WRAPPER_SCRIPT" ]; then + echo " === Download script wrapper ===" + resolveFile $GRADLE_WRAPPER_SCRIPT + mv "$GRADLE_WRAPPER_OFBIZ_PATH/$GRADLE_WRAPPER_SCRIPT" . + chmod u+x $GRADLE_WRAPPER_SCRIPT + fi + echo " === Control downloaded files ===" if [ -n "$(whereIsBinary shasum)" ]; then echo "$SHASUM_GRADLE_WRAPPER_FILES" | shasum -c -; |
Free forum by Nabble | Edit this page |