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.
jq
1.7 doesn't like the unescaped newlines in the GitHub API response(which includes release notes). Since none of these scripts use the
release notes, we can strip out all
\r
and\n
characters.Also added
set -euo pipefail
tolib/utils.bash
and a test to bailout early if no toolchains in the API response match the current os/arch.
Finally,
uname -m
is preferred touname -p
since the latter canreturn
unknown
(which is the case on Alpine Linux running in Docker ona Darwin aarch64 host). On that topic, previous toolchain releases for
Linux ARM hosts were sometimes labeled as
arm
and sometimes asaarch64
, so a pattern is now used to match those values.At some point, it might make sense to go back to older releases and
hardcode their URLs since the filename formats have not always been 100%
consistent.
Fixes #13.