mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-10-03 22:41:09 +02:00
Verify checksums for pull requests from other people
This has the CI step verify the checksums for URLs that might have been added or edited to build definitions in a pull request.
This commit is contained in:
parent
bff583b247
commit
3add5c4637
2 changed files with 15 additions and 0 deletions
|
@ -64,6 +64,19 @@ update() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
verify() {
|
||||||
|
local url
|
||||||
|
local checksum
|
||||||
|
local file
|
||||||
|
for url in $(potentially_new_packages "$1"); do
|
||||||
|
checksum="${url#*#}"
|
||||||
|
url="${url%#*}"
|
||||||
|
echo "Verifying checksum for $url"
|
||||||
|
file="${TMPDIR:-/tmp}/$checksum"
|
||||||
|
download_and_verify "$url" "$file" "$checksum"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
stats() {
|
stats() {
|
||||||
local packages=( $(extract_urls ./share/ruby-build/*) )
|
local packages=( $(extract_urls ./share/ruby-build/*) )
|
||||||
local total="${#packages[@]}"
|
local total="${#packages[@]}"
|
||||||
|
|
|
@ -8,6 +8,8 @@ bats -t test || STATUS="$?"
|
||||||
|
|
||||||
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
|
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
|
||||||
./script/mirror update "$TRAVIS_COMMIT_RANGE"
|
./script/mirror update "$TRAVIS_COMMIT_RANGE"
|
||||||
|
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
./script/mirror verify "$TRAVIS_COMMIT_RANGE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit "$STATUS"
|
exit "$STATUS"
|
||||||
|
|
Loading…
Reference in a new issue