-
Notifications
You must be signed in to change notification settings - Fork 10
ASF: remove gradle-wrapper.jar file to make ASF compliant #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+98
−21
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ca69872
ASF: update files to make ASF compliance
ostinru 02e87a5
license
ostinru b9f0745
import gradle-include.sh
ostinru e50e78d
Download gradle-wrapper when needed
ostinru 2284279
do not exclude gradle-wrapper.properties
ostinru cbb2ed4
add eXecute bit to gradle-include.sh
ostinru 388a022
rename script
ostinru 03f0ce9
fix checksums
ostinru 5cb37ce
drop gradle-wrapper.jar
ostinru 2fba711
cleanup
ostinru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| e996d452d2645e70c01c11143ca2d3742734a28da2bf61f25c82bdc288c9e637 |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Copyright (C) 2024 Dremio | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Download the gradle-wrapper.jar if necessary and verify its integrity. | ||
| # This script is invoked by server/Makefile | ||
|
|
||
| if [[ -z "${APP_HOME:-}" ]]; then | ||
| # set APP_HOME as parent directory of the current script | ||
| APP_HOME="$(cd -- "$(dirname -- "$0")" && pwd)" | ||
| fi | ||
|
|
||
|
|
||
| # Extract the Gradle version from gradle-wrapper.properties. | ||
| GRADLE_DIST_VERSION="$(grep distributionUrl= "$APP_HOME/gradle/wrapper/gradle-wrapper.properties" | sed 's/^.*gradle-\([0-9.]*\)-[a-z]*.zip$/\1/')" | ||
| GRADLE_WRAPPER_SHA256="$APP_HOME/gradle/wrapper/gradle-wrapper-${GRADLE_DIST_VERSION}.jar.sha256" | ||
| GRADLE_WRAPPER_JAR="$APP_HOME/gradle/wrapper/gradle-wrapper.jar" | ||
| if [ -x "$(command -v sha256sum)" ] ; then | ||
| SHASUM="sha256sum" | ||
| else | ||
| if [ -x "$(command -v shasum)" ] ; then | ||
| SHASUM="shasum -a 256" | ||
| else | ||
| echo "Neither sha256sum nor shasum are available, install either." > /dev/stderr | ||
| exit 1 | ||
| fi | ||
| fi | ||
| if [ ! -e "${GRADLE_WRAPPER_SHA256}" ]; then | ||
| # Delete the wrapper jar, if the checksum file does not exist. | ||
| rm -f "${GRADLE_WRAPPER_JAR}" | ||
| fi | ||
| if [ -e "${GRADLE_WRAPPER_JAR}" ]; then | ||
| # Verify the wrapper jar, if it exists, delete wrapper jar and checksum file, if the checksums | ||
| # do not match. | ||
| JAR_CHECKSUM="$(${SHASUM} "${GRADLE_WRAPPER_JAR}" | cut -d\ -f1)" | ||
| EXPECTED="$(cat "${GRADLE_WRAPPER_SHA256}")" | ||
| if [ "${JAR_CHECKSUM}" != "${EXPECTED}" ]; then | ||
| rm -f "${GRADLE_WRAPPER_JAR}" "${GRADLE_WRAPPER_SHA256}" | ||
| fi | ||
| fi | ||
| if [ ! -e "${GRADLE_WRAPPER_SHA256}" ]; then | ||
| curl --location --output "${GRADLE_WRAPPER_SHA256}" https://services.gradle.org/distributions/gradle-${GRADLE_DIST_VERSION}-wrapper.jar.sha256 || exit 1 | ||
| fi | ||
| if [ ! -e "${GRADLE_WRAPPER_JAR}" ]; then | ||
| # The Gradle version extracted from the `distributionUrl` property does not contain ".0" patch | ||
| # versions. Need to append a ".0" in that case to download the wrapper jar. | ||
| GRADLE_VERSION="$(echo "$GRADLE_DIST_VERSION" | sed 's/^\([0-9]*[.][0-9]*\)$/\1.0/')" | ||
| curl --location --output "${GRADLE_WRAPPER_JAR}" https://raw.githubusercontent.com/gradle/gradle/v${GRADLE_VERSION}/gradle/wrapper/gradle-wrapper.jar || exit 1 | ||
| JAR_CHECKSUM="$(${SHASUM} "${GRADLE_WRAPPER_JAR}" | cut -d\ -f1)" | ||
| EXPECTED="$(cat "${GRADLE_WRAPPER_SHA256}")" | ||
| if [ "${JAR_CHECKSUM}" != "${EXPECTED}" ]; then | ||
| # If the (just downloaded) checksum and the downloaded wrapper jar do not match, something | ||
| # really bad is going on. | ||
| echo "Expected sha256 of the downloaded gradle-wrapper.jar does not match the downloaded sha256!" > /dev/stderr | ||
| exit 1 | ||
| fi | ||
| fi | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.