Compare commits

...

44 Commits

Author SHA1 Message Date
Taiki Endo
5b205dd5b8 Release 2.18.16 2023-09-23 21:13:00 +09:00
Taiki Endo
f664a60d0a Update cargo-machete@latest to 0.6.0 2023-09-23 21:10:09 +09:00
Taiki Endo
99f24c701f Update cargo-llvm-cov@latest to 0.5.32 2023-09-23 21:10:09 +09:00
Taiki Endo
05acba8f2d Release 2.18.15 2023-09-22 20:19:19 +09:00
Taiki Endo
2c288a7d53 Update cargo-careful@latest to 0.4.0 (#232) 2023-09-22 17:01:29 +10:00
Taiki Endo
2afb713f1c Release 2.18.14 2023-09-21 10:07:20 +09:00
Taiki Endo
5d0fca79ad Update readme 2023-09-21 10:07:10 +09:00
Taiki Endo
14deed0413 Update syft@latest to 0.91.0 (#231) 2023-09-20 21:38:21 +00:00
Taiki Endo
0143d8cb45 Update wasmtime@latest to 13.0.0 (#230) 2023-09-21 07:33:26 +10:00
Taiki Endo
2358ab6439 Release 2.18.13 2023-09-17 21:46:26 +09:00
Taiki Endo
d7013fbfd0 Update manifest (#228)
* Update `cargo-binstall@latest` to 1.3.1

* Update `cargo-make@latest` to 0.37.1

* Update `cargo-tarpaulin@latest` to 0.27.0
2023-09-17 21:46:00 +09:00
Taiki Endo
de0d48bde6 Release 2.18.12 2023-09-17 00:24:06 +09:00
Taiki Endo
a4beb34f32 ci: Test cmd on Windows 2023-09-17 00:22:00 +09:00
Taiki Endo
46ad021080 Remove needless $ 2023-09-16 23:11:00 +09:00
Taiki Endo
13c0d6f598 Do not install jq if not affected by bugs, even on Windows 2023-09-16 22:54:11 +09:00
Taiki Endo
af0cad7ea8 ci: Test a case that cargo is not available 2023-09-16 22:27:52 +09:00
Taiki Endo
55b35a1b0d Fix some bugs on Windows 2023-09-16 22:26:41 +09:00
Taiki Endo
b441885d30 tidy: Update tools/tidy.sh and add SPDX-License-Identifier 2023-09-16 17:56:46 +09:00
Taiki Endo
1c8b6e3bf4 Release 2.18.11 2023-09-16 02:45:06 +09:00
Taiki Endo
c50dab88b6 Update cargo-hack@latest to 0.6.8 2023-09-16 02:44:43 +09:00
Taiki Endo
09f5ee3f05 Release 2.18.10 2023-09-15 12:14:14 +09:00
Taiki Endo
befd933e5e Update wasmtime@latest to 12.0.2 (#226) 2023-09-15 10:20:45 +10:00
Taiki Endo
62992553e4 Update cargo-dinghy@latest to 0.6.7 2023-09-15 03:13:45 +09:00
Taiki Endo
0163f6cf65 Release 2.18.9 2023-09-12 10:58:38 +09:00
Taiki Endo
10becfbf4e Update syft@latest to 0.90.0 (#223) 2023-09-12 10:33:21 +10:00
Taiki Endo
63c295a1d1 Release 2.18.8 2023-09-12 02:59:13 +09:00
Taiki Endo
1bbd028e93 Update cargo-no-dev-deps@latest to 0.2.7 2023-09-12 02:58:43 +09:00
Taiki Endo
006fba6182 Update cargo-minimal-versions@latest to 0.1.19 2023-09-12 02:58:43 +09:00
Taiki Endo
4d6ceceded Update cargo-hack@latest to 0.6.7 2023-09-12 02:58:43 +09:00
Taiki Endo
9afdc87209 Release 2.18.7 2023-09-11 21:34:53 +09:00
Taiki Endo
dd988265fe Update cargo-dinghy@latest to 0.6.5 (#221) 2023-09-11 22:17:45 +10:00
Taiki Endo
b89cfc4cdb Release 2.18.6 2023-09-10 13:01:06 +09:00
Taiki Endo
6d728686b1 Update dprint@latest to 0.41.0 2023-09-10 13:00:46 +09:00
Taiki Endo
f4f65fa33a Update cargo-no-dev-deps@latest to 0.2.6 2023-09-10 13:00:46 +09:00
Taiki Endo
ec4a09b691 Update cargo-minimal-versions@latest to 0.1.18 2023-09-10 13:00:46 +09:00
Taiki Endo
230cf1a7c2 Release 2.18.5 2023-09-09 21:30:39 +09:00
Taiki Endo
78fb098b9c Update cargo-no-dev-deps@latest to 0.2.5 2023-09-09 21:27:06 +09:00
Taiki Endo
ff244ea17b Update cargo-minimal-versions@latest to 0.1.17 2023-09-09 21:27:06 +09:00
Taiki Endo
ce41e556bc Update CI config 2023-09-09 21:07:42 +09:00
Taiki Endo
c2391e8e5f Release 2.18.4 2023-09-09 16:48:01 +09:00
Taiki Endo
51f7de925c Update cargo-hack@latest to 0.6.6 2023-09-09 16:47:03 +09:00
Taiki Endo
37beb9ded5 Update CI config 2023-09-09 15:29:11 +09:00
Taiki Endo
f3f0bc9f82 Release 2.18.3 2023-09-09 03:30:45 +09:00
Taiki Endo
f8ff1ab8a1 Update cargo-make@latest to 0.37.0 2023-09-09 03:29:46 +09:00
21 changed files with 784 additions and 136 deletions

View File

@@ -41,11 +41,11 @@ jobs:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: ubuntu-20.04
- os: ubuntu-22.04
tool: major.minor.patch
- os: ubuntu-20.04
- os: ubuntu-22.04
tool: major.minor
- os: ubuntu-20.04
- os: ubuntu-22.04
tool: major
- os: macos-11
- os: macos-12
@@ -81,6 +81,10 @@ jobs:
run: just --version; shfmt --version; protoc --version
shell: powershell
if: startsWith(matrix.os, 'windows')
- name: Test cmd
run: just --version & shfmt --version & protoc --version
shell: cmd
if: startsWith(matrix.os, 'windows')
# We use the version output to check the version of binstall, but they
# several times change the version output format in the past so we need to
# check it with CI. (e.g., 0.14.0->0.16.0 update change it
@@ -125,7 +129,7 @@ jobs:
# tar and gzip are required for actions/checkout on *-minimal images
microdnf install -y tar gzip
fi
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
curl --proto '=https' --tlsv1.2 -fsSL --retry 10 https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >>"${GITHUB_PATH}"
if: startsWith(matrix.container, 'fedora') || startsWith(matrix.container, 'almalinux') || startsWith(matrix.container, 'centos')
- name: Install requirements (alpine)
@@ -134,7 +138,7 @@ jobs:
apk --no-cache add bash cargo
shell: sh
if: startsWith(matrix.container, 'alpine')
- uses: actions/checkout@v3 # TODO: actions/checkout@v3 requires glibc 2.28+
- uses: actions/checkout@v3 # TODO: actions/checkout@v4 requires glibc 2.28+
with:
persist-credentials: false
# cross attempts to install rust-src when Cargo.toml is available even if `cross --version`
@@ -146,6 +150,21 @@ jobs:
with:
tool: ${{ steps.tool-list.outputs.tool }}
test-no-cargo:
runs-on: ubuntu-latest
timeout-minutes: 60
container: ubuntu:22.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Generate tool list
id: tool-list
run: tools/ci/tool-list.sh >>"${GITHUB_OUTPUT}"
- uses: ./
with:
tool: ${{ steps.tool-list.outputs.tool }}
manifest:
runs-on: ubuntu-latest
timeout-minutes: 60

View File

@@ -10,6 +10,82 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [2.18.16] - 2023-09-23
- Update `cargo-machete@latest` to 0.6.0.
- Update `cargo-llvm-cov@latest` to 0.5.32.
## [2.18.15] - 2023-09-22
- Update `cargo-careful@latest` to 0.4.0.
## [2.18.14] - 2023-09-21
- Update `syft@latest` to 0.91.0.
- Update `wasmtime@latest` to 13.0.0.
## [2.18.13] - 2023-09-17
- Update `cargo-tarpaulin@latest` to 0.27.0.
- Update `cargo-make@latest` to 0.37.1.
- Update `cargo-binstall@latest` to 1.3.1.
## [2.18.12] - 2023-09-16
- Fix some bugs on Windows.
## [2.18.11] - 2023-09-15
- Update `cargo-hack@latest` to 0.6.8.
## [2.18.10] - 2023-09-15
- Update `wasmtime@latest` to 12.0.2.
- Update `cargo-dinghy@latest` to 0.6.7.
## [2.18.9] - 2023-09-12
- Update `syft@latest` to 0.90.0.
## [2.18.8] - 2023-09-11
- Update `cargo-no-dev-deps@latest` to 0.2.7.
- Update `cargo-minimal-versions@latest` to 0.1.19.
- Update `cargo-hack@latest` to 0.6.7.
## [2.18.7] - 2023-09-11
- Update `cargo-dinghy@latest` to 0.6.5.
## [2.18.6] - 2023-09-10
- Update `dprint@latest` to 0.41.0.
- Update `cargo-no-dev-deps@latest` to 0.2.6.
- Update `cargo-minimal-versions@latest` to 0.1.18.
## [2.18.5] - 2023-09-09
- Update `cargo-no-dev-deps@latest` to 0.2.5.
- Update `cargo-minimal-versions@latest` to 0.1.17.
## [2.18.4] - 2023-09-09
- Update `cargo-hack@latest` to 0.6.6.
## [2.18.3] - 2023-09-08
- Update `cargo-make@latest` to 0.37.0.
## [2.18.2] - 2023-09-08
- Update `protoc@latest` to 3.24.3.
@@ -1173,7 +1249,21 @@ Note: This release is considered a breaking change because installing on version
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.18.2...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.18.16...HEAD
[2.18.16]: https://github.com/taiki-e/install-action/compare/v2.18.15...v2.18.16
[2.18.15]: https://github.com/taiki-e/install-action/compare/v2.18.14...v2.18.15
[2.18.14]: https://github.com/taiki-e/install-action/compare/v2.18.13...v2.18.14
[2.18.13]: https://github.com/taiki-e/install-action/compare/v2.18.12...v2.18.13
[2.18.12]: https://github.com/taiki-e/install-action/compare/v2.18.11...v2.18.12
[2.18.11]: https://github.com/taiki-e/install-action/compare/v2.18.10...v2.18.11
[2.18.10]: https://github.com/taiki-e/install-action/compare/v2.18.9...v2.18.10
[2.18.9]: https://github.com/taiki-e/install-action/compare/v2.18.8...v2.18.9
[2.18.8]: https://github.com/taiki-e/install-action/compare/v2.18.7...v2.18.8
[2.18.7]: https://github.com/taiki-e/install-action/compare/v2.18.6...v2.18.7
[2.18.6]: https://github.com/taiki-e/install-action/compare/v2.18.5...v2.18.6
[2.18.5]: https://github.com/taiki-e/install-action/compare/v2.18.4...v2.18.5
[2.18.4]: https://github.com/taiki-e/install-action/compare/v2.18.3...v2.18.4
[2.18.3]: https://github.com/taiki-e/install-action/compare/v2.18.2...v2.18.3
[2.18.2]: https://github.com/taiki-e/install-action/compare/v2.18.1...v2.18.2
[2.18.1]: https://github.com/taiki-e/install-action/compare/v2.18.0...v2.18.1
[2.18.0]: https://github.com/taiki-e/install-action/compare/v2.17.8...v2.18.0

View File

@@ -88,7 +88,7 @@ https://spdx.org/licenses
| [**cargo-hack**](https://github.com/taiki-e/cargo-hack) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-hack/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-hack/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-hack/blob/HEAD/LICENSE-MIT) |
| [**cargo-llvm-cov**](https://github.com/taiki-e/cargo-llvm-cov) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-llvm-cov/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-MIT) |
| [**cargo-machete**](https://github.com/bnjbvr/cargo-machete) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bnjbvr/cargo-machete/releases) | Linux, macOS, Windows | [MIT](https://github.com/bnjbvr/cargo-machete/blob/HEAD/LICENSE.md) |
| [**cargo-make**](https://github.com/sagiegurari/cargo-make) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sagiegurari/cargo-make/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/sagiegurari/cargo-make/blob/master/LICENSE) |
| [**cargo-make**](https://github.com/sagiegurari/cargo-make) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sagiegurari/cargo-make/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/sagiegurari/cargo-make/blob/HEAD/LICENSE) |
| [**cargo-minimal-versions**](https://github.com/taiki-e/cargo-minimal-versions) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-minimal-versions/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-MIT) |
| [**cargo-no-dev-deps**](https://github.com/taiki-e/cargo-no-dev-deps) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-no-dev-deps/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-no-dev-deps/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-no-dev-deps/blob/HEAD/LICENSE-MIT) |
| [**cargo-tarpaulin**](https://github.com/xd009642/tarpaulin) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/xd009642/tarpaulin/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-APACHE) OR [MIT](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-MIT) |

250
main.sh
View File

@@ -58,18 +58,11 @@ download_and_extract() {
local checksum="$2"
local bin_dir="$3"
local bin_in_archive="$4" # path to bin in archive
if [[ "${bin_dir}" == "/usr/"* ]]; then
if [[ ! -d "${bin_dir}" ]]; then
bin_dir="${HOME}/.install-action/bin"
if [[ ! -d "${bin_dir}" ]]; then
mkdir -p "${bin_dir}"
canonicalize_windows_path "${bin_dir}" >>"${GITHUB_PATH}"
export PATH="${PATH}:${bin_dir}"
fi
fi
if [[ "${bin_dir}" == "${install_action_dir}/bin" ]]; then
init_install_action_bin_dir
fi
local installed_bin
local installed_bin
# xbuild's binary name is "x", as opposed to the usual crate name
case "${tool}" in
xbuild) installed_bin="${bin_dir}/x" ;;
@@ -157,17 +150,17 @@ read_manifest() {
local tool="$1"
local version="$2"
local manifest
rust_crate=$(jq -r ".rust_crate" "${manifest_dir}/${tool}.json")
manifest=$(jq -r ".\"${version}\"" "${manifest_dir}/${tool}.json")
rust_crate=$(call_jq -r ".rust_crate" "${manifest_dir}/${tool}.json")
manifest=$(call_jq -r ".\"${version}\"" "${manifest_dir}/${tool}.json")
if [[ "${manifest}" == "null" ]]; then
download_info="null"
return 0
fi
exact_version=$(jq <<<"${manifest}" -r '.version')
exact_version=$(call_jq <<<"${manifest}" -r '.version')
if [[ "${exact_version}" == "null" ]]; then
exact_version="${version}"
else
manifest=$(jq -r ".\"${exact_version}\"" "${manifest_dir}/${tool}.json")
manifest=$(call_jq -r ".\"${exact_version}\"" "${manifest_dir}/${tool}.json")
fi
case "${host_os}" in
linux)
@@ -175,24 +168,24 @@ read_manifest() {
# usually preferred over linux-gnu binaries because they can avoid glibc version issues.
# (rustc enables statically linking for linux-musl by default, except for mips.)
host_platform="${host_arch}_linux_musl"
download_info=$(jq <<<"${manifest}" -r ".${host_platform}")
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
if [[ "${download_info}" == "null" ]]; then
# Even if host_env is musl, we won't issue an error here because it seems that in
# some cases linux-gnu binaries will work on linux-musl hosts.
# https://wiki.alpinelinux.org/wiki/Running_glibc_programs
# TODO: However, a warning may make sense.
host_platform="${host_arch}_linux_gnu"
download_info=$(jq <<<"${manifest}" -r ".${host_platform}")
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
fi
;;
macos | windows)
# Binaries compiled for x86_64 macOS will usually also work on aarch64 macOS.
# Binaries compiled for x86_64 Windows will usually also work on aarch64 Windows 11+.
host_platform="${host_arch}_${host_os}"
download_info=$(jq <<<"${manifest}" -r ".${host_platform}")
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
if [[ "${download_info}" == "null" ]] && [[ "${host_arch}" != "x86_64" ]]; then
host_platform="x86_64_${host_os}"
download_info=$(jq <<<"${manifest}" -r ".${host_platform}")
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
fi
;;
*) bail "unsupported OS type '${host_os}' for ${tool}" ;;
@@ -204,20 +197,24 @@ read_download_info() {
if [[ "${download_info}" == "null" ]]; then
bail "${tool}@${version} for '${host_os}' is not supported"
fi
checksum=$(jq <<<"${download_info}" -r '.checksum')
url=$(jq <<<"${download_info}" -r '.url')
checksum=$(call_jq <<<"${download_info}" -r '.checksum')
url=$(call_jq <<<"${download_info}" -r '.url')
if [[ "${url}" == "null" ]]; then
local template
template=$(jq -r ".template.${host_platform}" "${manifest_dir}/${tool}.json")
url=$(jq <<<"${template}" -r '.url')
template=$(call_jq -r ".template.${host_platform}" "${manifest_dir}/${tool}.json")
url=$(call_jq <<<"${template}" -r '.url')
url="${url//\$\{version\}/${exact_version}}"
bin_in_archive=$(jq <<<"${template}" -r '.bin')
bin_in_archive=$(call_jq <<<"${template}" -r '.bin')
bin_in_archive="${bin_in_archive//\$\{version\}/${exact_version}}"
else
bin_in_archive=$(jq <<<"${download_info}" -r '.bin')
bin_in_archive=$(call_jq <<<"${download_info}" -r '.bin')
fi
if [[ "${rust_crate}" == "null" ]]; then
bin_dir="/usr/local/bin"
if [[ "${host_os}" == "windows" ]] || [[ ! -e /usr/local/bin ]]; then
bin_dir="${install_action_dir}/bin"
else
bin_dir=/usr/local/bin
fi
else
bin_dir="${cargo_bin}"
fi
@@ -235,10 +232,11 @@ download_from_download_info() {
}
install_cargo_binstall() {
local binstall_version
binstall_version=$(jq -r '.latest.version' "${manifest_dir}/cargo-binstall.json")
binstall_version=$(call_jq -r '.latest.version' "${manifest_dir}/cargo-binstall.json")
local install_binstall='1'
if [[ -f "${cargo_bin}/cargo-binstall${exe}" ]]; then
if [[ "$(cargo binstall -V)" == "${binstall_version}" ]]; then
_binstall_version=$("cargo-binstall${exe}" binstall -V 2>/dev/null || echo "")
if [[ -n "${_binstall_version}" ]]; then
if [[ "${_binstall_version}" == "${binstall_version}" ]]; then
info "cargo-binstall already installed at ${cargo_bin}/cargo-binstall${exe}"
install_binstall=''
else
@@ -248,10 +246,15 @@ install_cargo_binstall() {
fi
if [[ -n "${install_binstall}" ]]; then
info "installing cargo-binstall"
info "installing cargo-binstall@latest (${binstall_version})"
download_from_manifest "cargo-binstall" "latest"
info "cargo-binstall installed at $(type -P "cargo-binstall${exe}")"
rx cargo binstall -V
installed_at=$(type -P "cargo-binstall${exe}" || echo "")
if [[ -n "${installed_at}" ]]; then
info "cargo-binstall installed at ${installed_at}"
else
warn "cargo-binstall should be installed at ${bin_dir:-}/cargo-binstall${exe}; but cargo-binstall${exe} not found in path"
fi
rx "cargo-binstall${exe}" binstall -V
fi
}
apt_update() {
@@ -307,9 +310,21 @@ sys_install() {
fedora) dnf_install "$@" ;;
esac
}
init_install_action_bin_dir() {
if [[ -z "${init_install_action_bin:-}" ]]; then
init_install_action_bin=1
mkdir -p "${bin_dir}"
export PATH="${PATH}:${bin_dir}"
local _bin_dir
_bin_dir=$(canonicalize_windows_path "${bin_dir}")
# TODO: avoid this when already added
info "adding '${_bin_dir}' to PATH"
echo "${_bin_dir}" >>"${GITHUB_PATH}"
fi
}
canonicalize_windows_path() {
case "${host_os}" in
windows) sed <<<"$1" 's/^\/c\//C:\\/' ;;
windows) sed <<<"$1" 's/^\/c\//C:\\/; s/\//\\/g' ;;
*) echo "$1" ;;
esac
}
@@ -407,46 +422,107 @@ case "$(uname -m)" in
# So we can assume x86_64 unless it is aarch64 or arm.
*) host_arch="x86_64" ;;
esac
info "host platform: ${host_arch}_${host_os}"
tmp_dir="${HOME}/.install-action/tmp"
install_action_dir="${HOME}/.install-action"
tmp_dir="${install_action_dir}/tmp"
cargo_bin="${CARGO_HOME:-"${HOME}/.cargo"}/bin"
# If $CARGO_HOME does not exist, or cargo installed outside of $CARGO_HOME/bin
# is used ($CARGO_HOME/bin is most likely not included in the PATH), fallback to
# /usr/local/bin or $HOME/.install-action/bin.
if [[ ! -d "${cargo_bin}" ]] || { [[ "${host_os}" != "windows" ]] && [[ "$(type -P cargo || true)" != "${cargo_bin}/cargo${exe}" ]]; }; then
cargo_bin=/usr/local/bin
# /usr/local/bin or $install_action_dir/bin.
if [[ ! -e "${cargo_bin}" ]] || [[ "$(type -P cargo || true)" != "${cargo_bin}/cargo"* ]]; then
if type -P cargo &>/dev/null; then
info "cargo is located at $(type -P cargo)"
fi
if [[ "${host_os}" == "windows" ]] || [[ ! -e /usr/local/bin ]]; then
cargo_bin="${install_action_dir}/bin"
else
cargo_bin=/usr/local/bin
fi
fi
if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null || ! type -P tar &>/dev/null; then
case "${base_distro}" in
debian | fedora | alpine)
echo "::group::Install packages required for installation (jq, curl, and/or tar)"
sys_packages=()
if ! type -P curl &>/dev/null; then
sys_packages+=(ca-certificates curl)
fi
if ! type -P tar &>/dev/null; then
sys_packages+=(tar)
fi
if [[ "${dnf:-}" == "yum" ]]; then
# On RHEL7-based distribution jq requires EPEL
if ! type -P jq &>/dev/null; then
sys_packages+=(epel-release)
sys_install "${sys_packages[@]}"
sys_install jq --enablerepo=epel
else
sys_install "${sys_packages[@]}"
fi
else
if ! type -P jq &>/dev/null; then
sys_packages+=(jq)
fi
sys_install "${sys_packages[@]}"
fi
echo "::endgroup::"
;;
esac
fi
jq_use_b=''
case "${host_os}" in
linux)
if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null || ! type -P tar &>/dev/null; then
case "${base_distro}" in
debian | fedora | alpine)
echo "::group::Install packages required for installation (jq, curl, and/or tar)"
sys_packages=()
if ! type -P curl &>/dev/null; then
sys_packages+=(ca-certificates curl)
fi
if ! type -P tar &>/dev/null; then
sys_packages+=(tar)
fi
if [[ "${dnf:-}" == "yum" ]]; then
# On RHEL7-based distribution jq requires EPEL
if ! type -P jq &>/dev/null; then
sys_packages+=(epel-release)
sys_install "${sys_packages[@]}"
sys_install jq --enablerepo=epel
else
sys_install "${sys_packages[@]}"
fi
else
if ! type -P jq &>/dev/null; then
sys_packages+=(jq)
fi
sys_install "${sys_packages[@]}"
fi
echo "::endgroup::"
;;
*) warn "install-action requires at least jq and curl on non-Debian/Fedora/Alpine-based Linux" ;;
esac
fi
;;
macos)
if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null; then
warn "install-action requires at least jq and curl on macOS"
fi
;;
windows)
if ! type -P curl &>/dev/null; then
warn "install-action requires at least curl on Windows"
fi
# https://github.com/jqlang/jq/issues/1854
jq_use_b=1
jq="${install_action_dir}/jq/bin/jq.exe"
if [[ ! -f "${jq}" ]]; then
jq_version=$(jq --version || echo "")
case "${jq_version}" in
jq-1.[7-9]* | jq-1.[1-9][0-9]*) jq='' ;;
*)
_tmp=$(jq <<<"{}" -r .a || echo "")
if [[ "${_tmp}" == "null" ]]; then
jq=''
jq_use_b=''
else
info "old jq (${jq_version}) has bug on Windows; downloading jq 1.7 (will not be added to PATH)"
mkdir -p "${install_action_dir}/jq/bin"
url='https://github.com/jqlang/jq/releases/download/jq-1.7/jq-windows-amd64.exe'
checksum='2e9cc54d0a5d098e2007decec1dbb3c555ca2f5aabded7aec907fe0ffe401aab'
(
cd "${install_action_dir}/jq/bin"
download_and_checksum "${url}" "${checksum}"
mv tmp jq.exe
)
echo
fi
;;
esac
fi
;;
*) bail "unsupported host OS '${host_os}'" ;;
esac
call_jq() {
# https://github.com/jqlang/jq/issues/1854
if [[ -n "${jq_use_b}" ]]; then
"${jq:-jq}" -b "$@"
else
"${jq:-jq}" "$@"
fi
}
unsupported_tools=()
for tool in "${tools[@]}"; do
@@ -468,13 +544,11 @@ for tool in "${tools[@]}"; do
read_manifest "protoc" "${version}"
read_download_info "protoc" "${version}"
# Copying files to /usr/local/include requires sudo, so do not use it.
bin_dir="${HOME}/.install-action/bin"
include_dir="${HOME}/.install-action/include"
if [[ ! -d "${bin_dir}" ]]; then
mkdir -p "${bin_dir}"
bin_dir="${install_action_dir}/bin"
include_dir="${install_action_dir}/include"
init_install_action_bin_dir
if [[ ! -e "${include_dir}" ]]; then
mkdir -p "${include_dir}"
canonicalize_windows_path "${bin_dir}" >>"${GITHUB_PATH}"
export PATH="${PATH}:${bin_dir}"
fi
if ! type -P unzip &>/dev/null; then
case "${base_distro}" in
@@ -493,10 +567,10 @@ for tool in "${tools[@]}"; do
mv "bin/protoc${exe}" "${bin_dir}/"
mkdir -p "${include_dir}/"
cp -r include/. "${include_dir}/"
bin_dir=$(canonicalize_windows_path "${bin_dir}")
if [[ -z "${PROTOC:-}" ]]; then
info "setting PROTOC environment variable"
echo "PROTOC=${bin_dir}/protoc${exe}" >>"${GITHUB_ENV}"
_bin_dir=$(canonicalize_windows_path "${bin_dir}")
info "setting PROTOC environment variable to '${_bin_dir}/protoc${exe}'"
echo "PROTOC=${_bin_dir}/protoc${exe}" >>"${GITHUB_ENV}"
fi
)
rm -rf "${tmp_dir}"
@@ -519,7 +593,6 @@ for tool in "${tools[@]}"; do
snap_install valgrind --classic
;;
cargo-binstall)
info "installing ${tool}@${version}"
case "${version}" in
latest) ;;
*) warn "specifying the version of ${tool} is not supported by this action" ;;
@@ -580,21 +653,26 @@ for tool in "${tools[@]}"; do
xbuild) tool_bin="x" ;;
*) tool_bin="${tool}" ;;
esac
info "${tool} installed at $(type -P "${tool_bin}${exe}")"
installed_at=$(type -P "${tool_bin}${exe}" || echo "")
if [[ -n "${installed_at}" ]]; then
tool_bin="${tool_bin}${exe}"
else
installed_at=$(type -P "${tool_bin}" || echo "")
fi
if [[ -n "${installed_at}" ]]; then
info "${tool} installed at ${installed_at}"
else
warn "${tool} should be installed at ${bin_dir:+"${bin_dir}/"}${tool_bin}${exe}; but ${tool_bin}${exe} not found in path"
fi
# cargo-udeps 0.1.30 and wasm-pack 0.12.0 do not support --version option.
case "${tool}" in
cargo-careful | cargo-machete) ;; # cargo-careful 0.3.4 and cargo-machete 0.5.0 do not support neither --version nor --help option.
cargo-*)
if type -P cargo &>/dev/null; then
_cargo=cargo
else
_cargo="${tool}"
fi
case "${tool}" in
cargo-valgrind) rx "${_cargo}" "${tool#cargo-}" --help ;; # cargo-valgrind 2.1.0's --version option just calls cargo's --version option
cargo-valgrind) rx "${tool_bin}" "${tool#cargo-}" --help ;; # cargo-valgrind 2.1.0's --version option just calls cargo's --version option
*)
if ! rx "${_cargo}" "${tool#cargo-}" --version; then
rx "${_cargo}" "${tool#cargo-}" --help
if ! rx "${tool_bin}" "${tool#cargo-}" --version; then
rx "${tool_bin}" "${tool#cargo-}" --help
fi
;;
esac
@@ -609,7 +687,7 @@ for tool in "${tools[@]}"; do
done
if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
IFS=$','
IFS=','
info "install-action does not support ${unsupported_tools[*]}; fallback to cargo-binstall"
IFS=$'\n\t'
install_cargo_binstall

View File

@@ -21,26 +21,26 @@
}
},
"latest": {
"version": "1.3.0"
"version": "1.3.1"
},
"1.3.0": {
"1.3.1": {
"x86_64_linux_musl": {
"checksum": "c6b61f091191e0444f1a503ac8fa8ce53ae7cf77c9472d9e725e9bae099f36d6"
"checksum": "369247304d05e1f3726dbaa52c662487c9d2449566a92c8fb105f63f6f4e4556"
},
"x86_64_macos": {
"checksum": "fb4feeb108fb1133efa402677d202dffcd9dff7956ebae645a442fce0dfd923a"
"checksum": "2f9991cb1299a15f2dcaaf08ac354fd3f54cf196946beec6a165c66333e7eb2a"
},
"x86_64_windows": {
"checksum": "14fac83eb6f03159c4b495a0dc8bb338d88b0b3139d45a2fe1be1b0cc5259186"
"checksum": "091c21cdee2b8a24af63590b0689a1c82cfda781d97548f629400cc4f68bf3d7"
},
"aarch64_linux_musl": {
"checksum": "59183aae6e296cbaef4bae4e74ef0ddbced3cb52cadff236b8b729d1492cde05"
"checksum": "d9fc8f9a250f0f34c2b1a8155352db9889250742658d5ac4c53a8d94e1719da3"
},
"aarch64_macos": {
"checksum": "fbfeab286b70b4874563dbaa3630379ee5f4020562d00f67b116baee0ebc83eb"
"checksum": "ae64628dc15c8474b74af8bd416434f9a669b477293da63814eeef466627f939"
},
"aarch64_windows": {
"checksum": "30e325fa2da8e47d350237c5bc231f6eb916a3c7202f4b6fc22eeba848a331f1"
"checksum": "26ee1952efff16bbca277ba8c705b58d1a850185fc9622a31a1a51501395b83b"
}
}
}

View File

@@ -12,7 +12,21 @@
}
},
"latest": {
"version": "0.3.4"
"version": "0.4.0"
},
"0.4": {
"version": "0.4.0"
},
"0.4.0": {
"x86_64_linux_musl": {
"checksum": "54cd7e1972e9faf085e3d0798c02054d064bc72de051a2636ece6f5b0ce0176d"
},
"x86_64_macos": {
"checksum": "70d92ad8adf84192caa2066ba981780df926c8aa6cbd398fe489f87af336fe61"
},
"x86_64_windows": {
"checksum": "01ebcae79d9ba0cbb56e5c6bb5757d9cd074a3635704d15b0ef62a000c5d03a8"
}
},
"0.3": {
"version": "0.3.4"

View File

@@ -11,10 +11,34 @@
}
},
"latest": {
"version": "0.6.4"
"version": "0.6.7"
},
"0.6": {
"version": "0.6.4"
"version": "0.6.7"
},
"0.6.7": {
"x86_64_linux_musl": {
"checksum": "d5c4b78a4e660184fd32f017efbee65015ec86c041623b320c23bb87764e37e2"
},
"x86_64_macos": {
"checksum": "ffa03e78bdc71efd53c1fcbd16d92be0a79c1092de03fd43320db2a3b3800950"
}
},
"0.6.6": {
"x86_64_linux_musl": {
"checksum": "daffbfae6caf0e1c40b53cf33569074e4b1b80b8697e27f91eecd9a0a1f85809"
},
"x86_64_macos": {
"checksum": "ac0d058aab49ab751e072f1978972c22ffa195d68af43d04a9a801bffabbaa16"
}
},
"0.6.5": {
"x86_64_linux_musl": {
"checksum": "250a165b843022ee5e1a356a791f832bf2051a11ba97a9de531060bb98f7bdc0"
},
"x86_64_macos": {
"checksum": "6074cd8dd9ddf553f6915a0dd2c183bf7dd233bfd78322b8db2b421fb1a89a81"
}
},
"0.6.4": {
"x86_64_linux_musl": {

View File

@@ -2,10 +2,88 @@
"rust_crate": "cargo-hack",
"template": null,
"latest": {
"version": "0.6.5"
"version": "0.6.8"
},
"0.6": {
"version": "0.6.5"
"version": "0.6.8"
},
"0.6.8": {
"x86_64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.8/cargo-hack-x86_64-unknown-linux-musl.tar.gz",
"checksum": "0e99e6ecf6f04cfeb7bd126559f94c7d54c891cd6609fc2d5e6b327da9178069"
},
"x86_64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.8/cargo-hack-x86_64-apple-darwin.tar.gz",
"checksum": "f21d6c824bc9cac5c174fa61b8375df35f3c022a19eeefd7156dcaf99c18cb94"
},
"x86_64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.8/cargo-hack-x86_64-pc-windows-msvc.zip",
"checksum": "d3cedb628d4bebfbafd4ff83e47bc5185a0a907c721ab0013af0dcbf0cad7c53"
},
"aarch64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.8/cargo-hack-aarch64-unknown-linux-musl.tar.gz",
"checksum": "ea6e74180776d0908b21d938515e4a04fcdcb02d564bf08e397dc7191cbce524"
},
"aarch64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.8/cargo-hack-aarch64-apple-darwin.tar.gz",
"checksum": "9486a0e12919c667e17b9fd22e43c6449369ebeca0e705ed372090e87610e8fc"
},
"aarch64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.8/cargo-hack-aarch64-pc-windows-msvc.tar.gz",
"checksum": "946a28154a087ee4c1835327973e3e914d90d9e4840bf67b22422f2b634aa214"
}
},
"0.6.7": {
"x86_64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.7/cargo-hack-x86_64-unknown-linux-musl.tar.gz",
"checksum": "af3f992ce3bc2f766e1dedd91777b00839760d2571abc3d85f6c6b8a8c743ef8"
},
"x86_64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.7/cargo-hack-x86_64-apple-darwin.tar.gz",
"checksum": "c92a155df6839a17e8b167c6a1d0e5adb55a21623186f9401a151b3b478c041b"
},
"x86_64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.7/cargo-hack-x86_64-pc-windows-msvc.zip",
"checksum": "3817eed7255cf9683cf9fa580e067584a062cb7029a73b7057de24c2938d1783"
},
"aarch64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.7/cargo-hack-aarch64-unknown-linux-musl.tar.gz",
"checksum": "decd3237e11fef4d4b30052405905d549d05b9b09c3efe87d45a6f96abbcd460"
},
"aarch64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.7/cargo-hack-aarch64-apple-darwin.tar.gz",
"checksum": "e36fdcdf6b5064f84837acf3616cac1f191ba7af8f4c6bb599d3eb541cc712fb"
},
"aarch64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.7/cargo-hack-aarch64-pc-windows-msvc.tar.gz",
"checksum": "0aac8f8cb2b3a0e6158f42318b429bd2720ae55f15ca05477e4268bd3a8c16ea"
}
},
"0.6.6": {
"x86_64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.6/cargo-hack-x86_64-unknown-linux-musl.tar.gz",
"checksum": "c706770f61c4dcf3dfc0c87125b443306787032c50bf61d30724bac620846a48"
},
"x86_64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.6/cargo-hack-x86_64-apple-darwin.tar.gz",
"checksum": "d5a619778858d18d4ef3b291012b709b509a79ec66dad41590c692d5f35a30c8"
},
"x86_64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.6/cargo-hack-x86_64-pc-windows-msvc.zip",
"checksum": "eb56fab90b784fc668e9c25cece9967d296026a24c79db571f7420aca7bd956d"
},
"aarch64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.6/cargo-hack-aarch64-unknown-linux-musl.tar.gz",
"checksum": "a5d8a424c30bc3b3b6b9e44aa3810d5995dca7e648bfe2f139ef0af14ad8662e"
},
"aarch64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.6/cargo-hack-aarch64-apple-darwin.tar.gz",
"checksum": "aacf5cebfe7523ba1a610192bd76dcccfbea1b16aa8e8bd3ed8356abd5809980"
},
"aarch64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.6/cargo-hack-aarch64-pc-windows-msvc.tar.gz",
"checksum": "329f030f530bb65290150e4bf282065ecfe4f988aee6763fb87720e0dc60b4c9"
}
},
"0.6.5": {
"x86_64_linux_musl": {

View File

@@ -18,10 +18,27 @@
}
},
"latest": {
"version": "0.5.31"
"version": "0.5.32"
},
"0.5": {
"version": "0.5.31"
"version": "0.5.32"
},
"0.5.32": {
"x86_64_linux_musl": {
"checksum": "2709f1c132eac8c3e1e98f658e2f8fd79f71f0a72b373491aad9e92df3b6684c"
},
"x86_64_macos": {
"checksum": "d56c7b8d5ea02196b8682d242440a400566583f724dee9c9832a99ed9734fa0e"
},
"x86_64_windows": {
"checksum": "194ec6f3657edab3c5f9a4d7a5bb2ab614084d7484f69274d02798fcd2dbea0c"
},
"aarch64_linux_musl": {
"checksum": "2274d691284e4de55fa0a0fd4e7b5003db21f7c62d72986586a81a169cafd7ee"
},
"aarch64_macos": {
"checksum": "7893b26db568ce0c606c0b07cad52659abf2ee488d385581e166fa20924168e5"
}
},
"0.5.31": {
"x86_64_linux_musl": {

View File

@@ -2,7 +2,32 @@
"rust_crate": "cargo-machete",
"template": null,
"latest": {
"version": "0.5.0"
"version": "0.6.0"
},
"0.6": {
"version": "0.6.0"
},
"0.6.0": {
"x86_64_linux_musl": {
"url": "https://github.com/bnjbvr/cargo-machete/releases/download/v0.6.0/cargo-machete-v0.6.0-x86_64-unknown-linux-musl.tar.gz",
"checksum": "8f7f67f87c80d8ee331857e61c03762b71f9e68266a9193f4934cef1c8ccb449",
"bin": "cargo-machete-v0.6.0-x86_64-unknown-linux-musl/cargo-machete"
},
"x86_64_macos": {
"url": "https://github.com/bnjbvr/cargo-machete/releases/download/v0.6.0/cargo-machete-v0.6.0-x86_64-apple-darwin.tar.gz",
"checksum": "dab6a9127166b8889a1933864014664288e16a211a2e3de65585d69b18b84bbf",
"bin": "cargo-machete-v0.6.0-x86_64-apple-darwin/cargo-machete"
},
"x86_64_windows": {
"url": "https://github.com/bnjbvr/cargo-machete/releases/download/v0.6.0/cargo-machete-v0.6.0-x86_64-pc-windows-msvc.tar.gz",
"checksum": "4e3369fea5e87bdab2d4219dd07b69fa562a7b0081433464ead82dced36f3af1",
"bin": "cargo-machete-v0.6.0-x86_64-pc-windows-msvc/cargo-machete.exe"
},
"aarch64_macos": {
"url": "https://github.com/bnjbvr/cargo-machete/releases/download/v0.6.0/cargo-machete-v0.6.0-aarch64-apple-darwin.tar.gz",
"checksum": "c4957bade3109f147ebe1598fa8f0b555713bbe83310cd99c927fa25398ae847",
"bin": "cargo-machete-v0.6.0-aarch64-apple-darwin/cargo-machete"
}
},
"0.5": {
"version": "0.5.0"

View File

@@ -19,7 +19,38 @@
}
},
"latest": {
"version": "0.36.13"
"version": "0.37.1"
},
"0.37": {
"version": "0.37.1"
},
"0.37.1": {
"x86_64_linux_musl": {
"checksum": "6a4fbad3d519e6189772dd0b0d16aa137c8208e7492576ff11497645588459c0"
},
"x86_64_macos": {
"checksum": "a8dea1a7f8bc1e7e35bc14dc1cde15a2e122db1ee2ed8dbb787b5d4e33a19f12"
},
"x86_64_windows": {
"checksum": "531677bf6322139e694da4f37c5df722566675b32a020b7e0f37d4ec5d456052"
},
"aarch64_macos": {
"checksum": "b074fedfb6282b846e047a6336920d2d1bb65c6aa25ce03aa4465615e83a407d"
}
},
"0.37.0": {
"x86_64_linux_musl": {
"checksum": "ea7d52e9847c38f5aec60cd8e2f66fd90a9284f1e06fb25b3ef1276acb5251d7"
},
"x86_64_macos": {
"checksum": "3265730662da54c91002fb4d7deb93c61c46d05f937f751764f3625c22ead87a"
},
"x86_64_windows": {
"checksum": "09041e88db9ec51d2c93448ed4b16f78f0e838ee6e549b0139a71ae30cdc5239"
},
"aarch64_macos": {
"checksum": "8df5efcc19246c8e8fed753ad05f1d95efd2b9ecb84e3f306a36b8056ae631b9"
}
},
"0.36": {
"version": "0.36.13"

View File

@@ -21,10 +21,70 @@
}
},
"latest": {
"version": "0.1.16"
"version": "0.1.19"
},
"0.1": {
"version": "0.1.16"
"version": "0.1.19"
},
"0.1.19": {
"x86_64_linux_musl": {
"checksum": "ba393e37118a7f55c47cb14099c0554d5e5fcb3f4bfa422b608e00efb7bcefa2"
},
"x86_64_macos": {
"checksum": "dacffa0bf0b3e6fa1b587e82084bfbf8f74171240d50ecb3309a832f2e43f8e3"
},
"x86_64_windows": {
"checksum": "d6be0676301f3c6e6ba41f72a22e878b6e53a1a94cb6fd8a888cfa8fc8be4301"
},
"aarch64_linux_musl": {
"checksum": "fa5abed03b435bd6b70543f370fdc1c834611041b6b467d972bbec95aee1f9c1"
},
"aarch64_macos": {
"checksum": "376e4aa8f37ffacfd68b1f69fc0aa6ed7dc8f95bf5cc625fc054cc040e2ddd53"
},
"aarch64_windows": {
"checksum": "cde5b7a04a80e465e3ed677ecd75182f9d38e67db0b782d62caeb5f874c34f8b"
}
},
"0.1.18": {
"x86_64_linux_musl": {
"checksum": "d1cde56ac778d61f2179045d9f9f8086afabb1b5a371a35d82000a8cb7b9f150"
},
"x86_64_macos": {
"checksum": "307f516b0353132fa420e19eff3aae7f83ed84273eae5447752f886c23134bcc"
},
"x86_64_windows": {
"checksum": "bd4f276b0c115613992d9fa0ad8dd688828c5bf47c8b91a617638bb170549d7f"
},
"aarch64_linux_musl": {
"checksum": "efc430279c656b7c58965f41c82688ee10d84d4e5bfd193d3f7858d83db98982"
},
"aarch64_macos": {
"checksum": "b398d09d167b3fa253c835e56876151b59804ba083d9d6b4978d55bac767b692"
},
"aarch64_windows": {
"checksum": "a26eeef963905cc14de9dd1e11c8d6a7a1a7db812a040de37e3cdbef74cc546f"
}
},
"0.1.17": {
"x86_64_linux_musl": {
"checksum": "dbab6188ceca0396f80d6f6d931704568377fe5cb2985e3af54b73be721c1826"
},
"x86_64_macos": {
"checksum": "44134caa5b7a88bff8923c2616c4bc3e940b66539ec7d9bf47775f61873d4fc9"
},
"x86_64_windows": {
"checksum": "954948921af804f309368c587a38089a132225434be14d1f6a38f0140f39cb7b"
},
"aarch64_linux_musl": {
"checksum": "5317743fe7f1306f844062fe05c5777880219bd47a32047f5d9e7c5924b140ec"
},
"aarch64_macos": {
"checksum": "1550c655792cb18b03b6d3bec8ee74270eadb891c2f06b98c775134dd71b3801"
},
"aarch64_windows": {
"checksum": "fb81001414eea31810aa84943f2cf22d7f423b20170d1350534c04a3fc934344"
}
},
"0.1.16": {
"x86_64_linux_musl": {

View File

@@ -21,10 +21,70 @@
}
},
"latest": {
"version": "0.2.4"
"version": "0.2.7"
},
"0.2": {
"version": "0.2.4"
"version": "0.2.7"
},
"0.2.7": {
"x86_64_linux_musl": {
"checksum": "c513030b5c33de29c5d414801a61c64ceca9f58b3a021cd41339e13ef3335abc"
},
"x86_64_macos": {
"checksum": "88ce1a4a6fafbce491cb9037af499ee7dc85a6d3ac7f3c0592114a87782ab90f"
},
"x86_64_windows": {
"checksum": "ff6814dde2441a5c4ca60a5cf0571e907a5691fb4cbdc3dd0b32bb33966bafdb"
},
"aarch64_linux_musl": {
"checksum": "20b5a9e7936fe855877bb6d55090600f42bcf5ef2d86c720ef59e0a12864bd7b"
},
"aarch64_macos": {
"checksum": "8d408a5c9d8276e4e168b92b4a41c9e80bb352eabd431f93e8c147377b637328"
},
"aarch64_windows": {
"checksum": "2cbfa80772909a7195db75713c170f3b91afe8b37b7c7917ccb893b977545c24"
}
},
"0.2.6": {
"x86_64_linux_musl": {
"checksum": "95a00b9a7bac659c273422f68e6bb38e9e69fc0d1c163552ba7bebcf8c4915ee"
},
"x86_64_macos": {
"checksum": "412afe1fdc554ffdc155ba89e573b5c44cef8e5417440f29bf9ae4e9452bccb2"
},
"x86_64_windows": {
"checksum": "8d818e8d66bf5bfea09070377d7f7830d888cf45392734abecb18ab75c837060"
},
"aarch64_linux_musl": {
"checksum": "dcb7de74155818329078f4e0693e71c684e8088bd411bd9c310d40291540b60a"
},
"aarch64_macos": {
"checksum": "e45592ea2e8b9b1e8c00fea545543d5b62229e6159a32f1c11000c2cd680c693"
},
"aarch64_windows": {
"checksum": "7d35cbcf17b3114313f4cc19dbce84fcc51cb3949c0bc1f48110915a8aaac919"
}
},
"0.2.5": {
"x86_64_linux_musl": {
"checksum": "4c609f8d62669a8ecad8a83769e3a3adf5faab94820e69fd73473a37bfd39be4"
},
"x86_64_macos": {
"checksum": "82aea3272e74f49f10afd04f8e7451831408b006dc97a6d36b56bb81bfe862ec"
},
"x86_64_windows": {
"checksum": "a91f0c5f46b479c8e9ff84469a2e9dc5252301696db25900688b8180fb6436a5"
},
"aarch64_linux_musl": {
"checksum": "049696e69c9a1ed571dc93377e944c37e0c886517bc517a84de03a9591b0e013"
},
"aarch64_macos": {
"checksum": "125813b967068757faf1f9733ef018de0850a5e642e86d436b47b317202244ea"
},
"aarch64_windows": {
"checksum": "1cc8c6d9b2dc7619c45dd19fadc5f7465b8993d3242e402bdaac6eb5026bd500"
}
},
"0.2.4": {
"x86_64_linux_musl": {

View File

@@ -18,7 +18,27 @@
}
},
"latest": {
"version": "0.26.1"
"version": "0.27.0"
},
"0.27": {
"version": "0.27.0"
},
"0.27.0": {
"x86_64_linux_musl": {
"checksum": "b0cfcb086131773fb8a6a2cf8090c9416a8f233c2ae4bb887500f4e17d39fe7b"
},
"x86_64_macos": {
"checksum": "84c77137ca762c0cda3d4e8330ef3312efe72220da6470e8d657e5e545a11d2b"
},
"x86_64_windows": {
"checksum": "0114eef8cdb3c8466861dd64d7e16fd430cc0380406f230e16aa9e9c32af45e4"
},
"aarch64_linux_musl": {
"checksum": "6e4f5bc5adafd1730c82ec816b89279d5cdb8255180488fc560e646bef624687"
},
"aarch64_macos": {
"checksum": "375e7969d10faf76ec2ec29d11cbfa266e268357514cd05ed2a24554df7a8183"
}
},
"0.26": {
"version": "0.26.1"

22
manifests/dprint.json generated
View File

@@ -21,7 +21,27 @@
}
},
"latest": {
"version": "0.40.2"
"version": "0.41.0"
},
"0.41": {
"version": "0.41.0"
},
"0.41.0": {
"x86_64_linux_musl": {
"checksum": "a22a0b771327e14bcb2508303502fa325bc85b2ca1c099ec49324c736be37fad"
},
"x86_64_macos": {
"checksum": "28ef80b29135b428c4b87d0b6468b9280f2dea97fd4bada27cf247c7b8870f2f"
},
"x86_64_windows": {
"checksum": "f0416f1418d512066178c123daa5bf3dc061bcebd3e344906087762e3e6bc250"
},
"aarch64_linux_gnu": {
"checksum": "736bae33b5ed619eafbb5f6bdf65f5806f728a7b51e229ba6732afd3117b8f89"
},
"aarch64_macos": {
"checksum": "3edb4521887bae5afe5ced25b5a540fc0f889b61cd335b3b4aab80b4d391981f"
}
},
"0.40": {
"version": "0.40.2"

42
manifests/syft.json generated
View File

@@ -23,7 +23,47 @@
}
},
"latest": {
"version": "0.89.0"
"version": "0.91.0"
},
"0.91": {
"version": "0.91.0"
},
"0.91.0": {
"x86_64_linux_musl": {
"checksum": "51188401eb2a2425db1155ba18cb64db8275491a1e1049690fe6e8a371ff222a"
},
"x86_64_macos": {
"checksum": "724e6864a356834d8f3a40a3db2216884fc2c4cf69b67baa03cd08466e80fca9"
},
"x86_64_windows": {
"checksum": "9189e2246b5b649f8f09eb6d7500ee5f698253e94ebb34fab06ea6910489bcdc"
},
"aarch64_linux_musl": {
"checksum": "e9d3eb8120438325b79a8bf2a994692a111e5a47c63bbdf7762f7e9fb5a12f4a"
},
"aarch64_macos": {
"checksum": "d53362e44322e81015c9fa17f2254f2fa3d55dc04f18c1e0bc8891705aaf4696"
}
},
"0.90": {
"version": "0.90.0"
},
"0.90.0": {
"x86_64_linux_musl": {
"checksum": "7368d65830fe90ad96edac8a1d548193a36e18853f30e11b9f97772a573eae2a"
},
"x86_64_macos": {
"checksum": "5b2c36edf5a317eb45691484ad6eea6ffc2aee45fb97612492b93099a9407578"
},
"x86_64_windows": {
"checksum": "eaffd994f6c90ce39e7753f1cb48f5e61f7828b83dc8f27364490f02813d3645"
},
"aarch64_linux_musl": {
"checksum": "06bc39ff9ff3a3a5ba7055a158eace7bf105c8baf9eecfa33fbb1387e9dab4ed"
},
"aarch64_macos": {
"checksum": "9d596ab903becd9061cb9919e6e626835978246adaaf0392c871fdf34b974c38"
}
},
"0.89": {
"version": "0.89.0"

View File

@@ -2,13 +2,73 @@
"rust_crate": "wasmtime-cli",
"template": null,
"latest": {
"version": "12.0.1"
"version": "13.0.0"
},
"13": {
"version": "13.0.0"
},
"13.0": {
"version": "13.0.0"
},
"13.0.0": {
"x86_64_linux_gnu": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v13.0.0/wasmtime-v13.0.0-x86_64-linux.tar.xz",
"checksum": "af14e310a27d28e07675bb5d5254adee1cfddfeab0d9541e68b074f6263f4c2d",
"bin": "wasmtime-v13.0.0-x86_64-linux/wasmtime"
},
"x86_64_macos": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v13.0.0/wasmtime-v13.0.0-x86_64-macos.tar.xz",
"checksum": "a68023cd806de4432a102f24b07b204c8f83f8ce626c5ac4f248faa0807d0f49",
"bin": "wasmtime-v13.0.0-x86_64-macos/wasmtime"
},
"x86_64_windows": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v13.0.0/wasmtime-v13.0.0-x86_64-windows.zip",
"checksum": "ad1dea7c069eeda2432d4344221b05c46d146aaa7f5b16cbd468932e9fdaac76",
"bin": "wasmtime-v13.0.0-x86_64-windows/wasmtime.exe"
},
"aarch64_linux_gnu": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v13.0.0/wasmtime-v13.0.0-aarch64-linux.tar.xz",
"checksum": "2422b7c6c0d60bcfbab7d098ead0e120e24971525521a7758ea1a1db5ce57395",
"bin": "wasmtime-v13.0.0-aarch64-linux/wasmtime"
},
"aarch64_macos": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v13.0.0/wasmtime-v13.0.0-aarch64-macos.tar.xz",
"checksum": "12b32b91e07f53ea363505530b6fb3312a7ac1e71ae38957bb545011f10dbaab",
"bin": "wasmtime-v13.0.0-aarch64-macos/wasmtime"
}
},
"12": {
"version": "12.0.1"
"version": "12.0.2"
},
"12.0": {
"version": "12.0.1"
"version": "12.0.2"
},
"12.0.2": {
"x86_64_linux_gnu": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-linux.tar.xz",
"checksum": "f78bde3bd5758b9b228b98e45c5b40a3f48f73a8d0b19dbed111cd71fcdca570",
"bin": "wasmtime-v12.0.2-x86_64-linux/wasmtime"
},
"x86_64_macos": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-macos.tar.xz",
"checksum": "ed1a8760c5ddc9d3565a76908bb1e8a008b731b43ffa069b18d403542e49c683",
"bin": "wasmtime-v12.0.2-x86_64-macos/wasmtime"
},
"x86_64_windows": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-windows.zip",
"checksum": "9843d87d6bde399d7ccb3ba8699486f5a5ea145b106fa3bd4ca6e13ab2c61119",
"bin": "wasmtime-v12.0.2-x86_64-windows/wasmtime.exe"
},
"aarch64_linux_gnu": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-linux.tar.xz",
"checksum": "1a59e011e9deb4d3d7eb468028a56026499f5584727ea0a8c90012037455ac3c",
"bin": "wasmtime-v12.0.2-aarch64-linux/wasmtime"
},
"aarch64_macos": {
"url": "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-macos.tar.xz",
"checksum": "3f20a5b95950e7291f9dd07c9d84ebe115b34db283c7939b8f4b45e833b84a4e",
"bin": "wasmtime-v12.0.2-aarch64-macos/wasmtime"
}
},
"12.0.1": {
"x86_64_linux_gnu": {

View File

@@ -1 +1 @@
git ls-files '*.sh' # TODO: check more files
git ls-files

View File

@@ -72,6 +72,10 @@ esac
tools=()
for manifest in tools/codegen/base/*.json; do
tool_name=$(basename "${manifest%.*}")
# cross -V requires rustc
if [[ "${tool_name}" == "cross" ]] && ! type -P rustc &>/dev/null; then
continue
fi
case "${host_os}" in
linux*)
for incompat in ${incompat_tools[@]+"${incompat_tools[@]}"}; do
@@ -120,14 +124,17 @@ case "${host_os}" in
fi
;;
esac
# cargo-watch/watchexec-cli is supported by cargo-binstall (through quickinstall)
case "${version}" in
latest) tools+=(cargo-watch watchexec-cli nextest) ;;
major.minor.patch) tools+=(cargo-watch@8.1.1 watchexec-cli@1.20.5 nextest@0.9.57) ;;
major.minor) tools+=(cargo-watch@8.1 watchexec-cli@1.20 nextest@0.9) ;;
major) tools+=(cargo-watch@8 watchexec-cli@1) ;;
*) exit 1 ;;
esac
# cargo-binstall requires cargo
if type -P cargo &>/dev/null; then
# cargo-watch/watchexec-cli is supported by cargo-binstall (through quickinstall)
case "${version}" in
latest) tools+=(cargo-watch watchexec-cli nextest) ;;
major.minor.patch) tools+=(cargo-watch@8.1.1 watchexec-cli@1.20.5 nextest@0.9.57) ;;
major.minor) tools+=(cargo-watch@8.1 watchexec-cli@1.20 nextest@0.9) ;;
major) tools+=(cargo-watch@8 watchexec-cli@1) ;;
*) exit 1 ;;
esac
fi
# sort and dedup
IFS=$'\n'

View File

@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
use anyhow::{bail, Context as _, Result};
use fs_err as fs;
use serde::{Deserialize, Serialize};

View File

@@ -250,19 +250,22 @@ if [[ -f tools/.tidy-check-license-headers ]]; then
info "checking license headers (experimental)"
failed_files=''
for p in $(eval $(<tools/.tidy-check-license-headers)); do
# TODO: More file types?
case "$(basename "${p}")" in
*.sh) prefix=("# ") ;;
*.rs | *.c | *.h | *.cpp | *.hpp | *.s | *.S) prefix=("// " "/* ") ;;
*.stderr | *.expanded.rs) continue ;; # generated files
*.sh | *.py | *.rb | *Dockerfile) prefix=("# ") ;;
*.rs | *.c | *.h | *.cpp | *.hpp | *.s | *.S | *.js) prefix=("// " "/* ") ;;
*.ld | *.x) prefix=("/* ") ;;
*) error "unrecognized file type: ${p}" ;;
# TODO: More file types?
*) continue ;;
esac
# TODO: The exact line number is not actually important; it is important
# that it be part of the top-level comments of the file.
line="1"
case "${p}" in
*.sh) line="2" ;; # shebang
esac
if IFS= LC_ALL=C read -rn3 -d '' shebang <"${p}" && [[ "${shebang}" == '#!/' ]]; then
line="2"
elif [[ "${p}" == *"Dockerfile" ]] && IFS= LC_ALL=C read -rn9 -d '' syntax <"${p}" && [[ "${syntax}" == '# syntax=' ]]; then
line="2"
fi
header_found=''
for pre in "${prefix[@]}"; do
if [[ "$(grep -E -n "${pre}SPDX-License-Identifier: " "${p}")" == "${line}:${pre}SPDX-License-Identifier: "* ]]; then