-
Notifications
You must be signed in to change notification settings - Fork 785
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
Simplify truffleruby+graalvm-dev
build definition re: download redirect
#2361
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
platform="$(uname -s)-$(uname -m)" | ||
case $platform in | ||
Linux-x86_64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-linux-amd64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-linux-amd64.url" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's stick to using |
||
;; | ||
Linux-aarch64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-linux-aarch64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-linux-aarch64.url" | ||
;; | ||
Darwin-x86_64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-darwin-amd64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-darwin-amd64.url" | ||
;; | ||
Darwin-arm64) | ||
url="https://raw.githubusercontent.com/graalvm/graal-languages-ea-builds/main/truffleruby/versions/latest-jvm-darwin-aarch64.url" | ||
url="https://github.com/graalvm/graal-languages-ea-builds/raw/HEAD/truffleruby/versions/latest-jvm-darwin-aarch64.url" | ||
;; | ||
*) | ||
colorize 1 "Unsupported platform: $platform" | ||
return 1 | ||
;; | ||
esac | ||
|
||
pushd "$BUILD_PATH" >/dev/null | ||
http get $url url.txt | ||
url=$(<url.txt) | ||
popd | ||
|
||
install_package "truffleruby+graalvm-dev" "$url" truffleruby | ||
urlfile="$(mktemp "${TMP}/truffleruby.XXXXXX")" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still save the download to a temporary file, but now we don't have to change the directory to work around aria2c limitation. |
||
http get "$url" "$urlfile" | ||
install_package "truffleruby+graalvm-dev" "$(<"$urlfile")" truffleruby | ||
rm -f "$urlfile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, and I confirmed it works with "file", "subdir/file" and "/abs/path".
You could reduce a bit of duplication:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwstauner Thanks for the deduplication suggestion, but I find that I prefer seeing the full
aria2c
invocation line in both instances even if there is a little duplication, mostly for the ease of reading.