mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 15:10:27 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8faf1ae00d | ||
|
|
6ebd8c0cb0 | ||
|
|
e59163289d | ||
|
|
03897c74e4 | ||
|
|
d7080cb663 | ||
|
|
9b00020f6f | ||
|
|
2c14471598 | ||
|
|
544b987e85 | ||
|
|
1014a1e7a6 | ||
|
|
df03a8f339 | ||
|
|
1bd25cfd26 | ||
|
|
4e38715ddc | ||
|
|
2d4372270d | ||
|
|
e5240ce0c5 | ||
|
|
cd2b50cd20 | ||
|
|
08b0c77d33 | ||
|
|
51b8ba088c | ||
|
|
c46ebac92e | ||
|
|
6058afcbf2 | ||
|
|
60784cb1f4 | ||
|
|
ccdec58fd9 |
@@ -44,7 +44,7 @@
|
|||||||
"languageSettings": [
|
"languageSettings": [
|
||||||
{
|
{
|
||||||
"languageId": ["*"],
|
"languageId": ["*"],
|
||||||
"dictionaries": ["rust"]
|
"dictionaries": ["bash", "rust"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ignorePaths": []
|
"ignorePaths": []
|
||||||
|
|||||||
1
.github/.cspell/project-dictionary.txt
vendored
1
.github/.cspell/project-dictionary.txt
vendored
@@ -22,7 +22,6 @@ pwsh
|
|||||||
quickinstall
|
quickinstall
|
||||||
rdme
|
rdme
|
||||||
sccache
|
sccache
|
||||||
shfmt
|
|
||||||
syft
|
syft
|
||||||
udeps
|
udeps
|
||||||
wasmtime
|
wasmtime
|
||||||
|
|||||||
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@@ -66,10 +66,10 @@ jobs:
|
|||||||
tool: ${{ steps.tool-list.outputs.tool }}
|
tool: ${{ steps.tool-list.outputs.tool }}
|
||||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
|
||||||
- name: Test bash
|
- name: Test bash
|
||||||
run: just --version; shfmt --version; protoc --version
|
run: just --version && shfmt --version && protoc --version
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Test sh
|
- name: Test sh
|
||||||
run: just --version; shfmt --version; protoc --version
|
run: just --version && shfmt --version && protoc --version
|
||||||
shell: sh
|
shell: sh
|
||||||
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
|
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
|
||||||
- name: Test pwsh
|
- name: Test pwsh
|
||||||
@@ -118,29 +118,8 @@ jobs:
|
|||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
container: ${{ matrix.container }}
|
container: ${{ matrix.container }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install requirements (ubuntu/debian)
|
|
||||||
run: |
|
|
||||||
set -eEuxo pipefail
|
|
||||||
apt-get -o Acquire::Retries=10 -qq update
|
|
||||||
apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends cargo
|
|
||||||
if: startsWith(matrix.container, 'ubuntu') || startsWith(matrix.container, 'debian')
|
|
||||||
- name: Install requirements (fedora/almalinux/centos)
|
|
||||||
run: |
|
|
||||||
set -eEuxo pipefail
|
|
||||||
curl --proto '=https' --tlsv1.2 -fsSL --retry 10 https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable --no-modify-path
|
|
||||||
echo "$HOME/.cargo/bin" >>"${GITHUB_PATH}"
|
|
||||||
if: startsWith(matrix.container, 'fedora') || startsWith(matrix.container, 'almalinux') || startsWith(matrix.container, 'centos')
|
|
||||||
- name: Install requirements (opensuse)
|
|
||||||
run: |
|
|
||||||
set -eEuxo pipefail
|
|
||||||
zypper install -y rustup
|
|
||||||
rustup toolchain add stable --profile minimal
|
|
||||||
if: startsWith(matrix.container, 'opensuse')
|
|
||||||
- name: Install requirements (archlinux)
|
|
||||||
run: pacman -Sy --noconfirm rust
|
|
||||||
if: startsWith(matrix.container, 'archlinux')
|
|
||||||
- name: Install requirements (alpine)
|
- name: Install requirements (alpine)
|
||||||
run: apk --no-cache add bash cargo
|
run: apk --no-cache add bash
|
||||||
shell: sh
|
shell: sh
|
||||||
if: startsWith(matrix.container, 'alpine')
|
if: startsWith(matrix.container, 'alpine')
|
||||||
- uses: taiki-e/checkout-action@v1
|
- uses: taiki-e/checkout-action@v1
|
||||||
@@ -153,19 +132,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tool: ${{ steps.tool-list.outputs.tool }}
|
tool: ${{ steps.tool-list.outputs.tool }}
|
||||||
|
|
||||||
test-no-cargo:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 60
|
|
||||||
container: ubuntu
|
|
||||||
steps:
|
|
||||||
- uses: taiki-e/checkout-action@v1
|
|
||||||
- name: Generate tool list
|
|
||||||
id: tool-list
|
|
||||||
run: tools/ci/tool-list.sh >>"${GITHUB_OUTPUT}"
|
|
||||||
- uses: ./
|
|
||||||
with:
|
|
||||||
tool: ${{ steps.tool-list.outputs.tool }}
|
|
||||||
|
|
||||||
manifest:
|
manifest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|||||||
37
CHANGELOG.md
37
CHANGELOG.md
@@ -10,6 +10,34 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.34.3] - 2024-06-04
|
||||||
|
|
||||||
|
- Update `biome@latest` to 1.8.0.
|
||||||
|
|
||||||
|
## [2.34.2] - 2024-06-03
|
||||||
|
|
||||||
|
- Update `typos@latest` to 1.22.0.
|
||||||
|
|
||||||
|
## [2.34.1] - 2024-06-03
|
||||||
|
|
||||||
|
- Update `git-cliff@latest` to 2.3.0.
|
||||||
|
|
||||||
|
## [2.34.0] - 2024-06-01
|
||||||
|
|
||||||
|
- Support cargo-binstall fallback without cargo.
|
||||||
|
|
||||||
|
## [2.33.36] - 2024-06-01
|
||||||
|
|
||||||
|
- Update `cargo-llvm-cov@latest` to 0.6.10.
|
||||||
|
|
||||||
|
## [2.33.35] - 2024-05-28
|
||||||
|
|
||||||
|
- Update `syft@latest` to 1.5.0.
|
||||||
|
|
||||||
|
## [2.33.34] - 2024-05-26
|
||||||
|
|
||||||
|
- Update `dprint@latest` to 0.46.1.
|
||||||
|
|
||||||
## [2.33.33] - 2024-05-25
|
## [2.33.33] - 2024-05-25
|
||||||
|
|
||||||
- Update `dprint@latest` to 0.46.0.
|
- Update `dprint@latest` to 0.46.0.
|
||||||
@@ -2215,7 +2243,14 @@ Note: This release is considered a breaking change because installing on version
|
|||||||
|
|
||||||
Initial release
|
Initial release
|
||||||
|
|
||||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.33.33...HEAD
|
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.34.3...HEAD
|
||||||
|
[2.34.3]: https://github.com/taiki-e/install-action/compare/v2.34.2...v2.34.3
|
||||||
|
[2.34.2]: https://github.com/taiki-e/install-action/compare/v2.34.1...v2.34.2
|
||||||
|
[2.34.1]: https://github.com/taiki-e/install-action/compare/v2.34.0...v2.34.1
|
||||||
|
[2.34.0]: https://github.com/taiki-e/install-action/compare/v2.33.36...v2.34.0
|
||||||
|
[2.33.36]: https://github.com/taiki-e/install-action/compare/v2.33.35...v2.33.36
|
||||||
|
[2.33.35]: https://github.com/taiki-e/install-action/compare/v2.33.34...v2.33.35
|
||||||
|
[2.33.34]: https://github.com/taiki-e/install-action/compare/v2.33.33...v2.33.34
|
||||||
[2.33.33]: https://github.com/taiki-e/install-action/compare/v2.33.32...v2.33.33
|
[2.33.33]: https://github.com/taiki-e/install-action/compare/v2.33.32...v2.33.33
|
||||||
[2.33.32]: https://github.com/taiki-e/install-action/compare/v2.33.31...v2.33.32
|
[2.33.32]: https://github.com/taiki-e/install-action/compare/v2.33.31...v2.33.32
|
||||||
[2.33.31]: https://github.com/taiki-e/install-action/compare/v2.33.30...v2.33.31
|
[2.33.31]: https://github.com/taiki-e/install-action/compare/v2.33.30...v2.33.31
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ improper_ctypes_definitions = "warn"
|
|||||||
non_ascii_idents = "warn"
|
non_ascii_idents = "warn"
|
||||||
rust_2018_idioms = "warn"
|
rust_2018_idioms = "warn"
|
||||||
single_use_lifetimes = "warn"
|
single_use_lifetimes = "warn"
|
||||||
|
unexpected_cfgs = { level = "warn", check-cfg = [
|
||||||
|
] }
|
||||||
unreachable_pub = "warn"
|
unreachable_pub = "warn"
|
||||||
unsafe_op_in_unsafe_fn = "warn"
|
unsafe_op_in_unsafe_fn = "warn"
|
||||||
[workspace.lints.clippy]
|
[workspace.lints.clippy]
|
||||||
@@ -27,12 +29,13 @@ borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang
|
|||||||
declare_interior_mutable_const = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665
|
declare_interior_mutable_const = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665
|
||||||
doc_markdown = { level = "allow", priority = 1 }
|
doc_markdown = { level = "allow", priority = 1 }
|
||||||
float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725
|
float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725
|
||||||
lint_groups_priority = { level = "allow", priority = 1 } # clippy bug: https://github.com/rust-lang/rust-clippy/issues/12270
|
incompatible_msrv = { level = "allow", priority = 1 } # buggy: doesn't consider cfg, https://github.com/rust-lang/rust-clippy/issues/12280, https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187
|
||||||
|
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12270
|
||||||
manual_assert = { level = "allow", priority = 1 }
|
manual_assert = { level = "allow", priority = 1 }
|
||||||
manual_range_contains = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395
|
manual_range_contains = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395
|
||||||
missing_errors_doc = { level = "allow", priority = 1 }
|
missing_errors_doc = { level = "allow", priority = 1 }
|
||||||
module_name_repetitions = { level = "allow", priority = 1 }
|
module_name_repetitions = { level = "allow", priority = 1 }
|
||||||
nonminimal_bool = { level = "allow", priority = 1 } # buggy https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool
|
nonminimal_bool = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool
|
||||||
similar_names = { level = "allow", priority = 1 }
|
similar_names = { level = "allow", priority = 1 }
|
||||||
single_match = { level = "allow", priority = 1 }
|
single_match = { level = "allow", priority = 1 }
|
||||||
single_match_else = { level = "allow", priority = 1 }
|
single_match_else = { level = "allow", priority = 1 }
|
||||||
|
|||||||
@@ -4,13 +4,11 @@
|
|||||||
|
|
||||||
(Example: [ffbd316](https://github.com/taiki-e/install-action/commit/ffbd316e0fe98cb460dae3a66cd2ef9deb398bb1))
|
(Example: [ffbd316](https://github.com/taiki-e/install-action/commit/ffbd316e0fe98cb460dae3a66cd2ef9deb398bb1))
|
||||||
|
|
||||||
1\. Add tool name to the table in ["Supported tools" section in `README.md`](https://github.com/taiki-e/install-action#supported-tools).
|
1\. Add base manifest to [`tools/codegen/base`](tools/codegen/base) directory.
|
||||||
|
|
||||||
2\. Add base manifest to [`tools/codegen/base`](tools/codegen/base) directory.
|
|
||||||
|
|
||||||
See JSON files in `tools/codegen/base` directory for examples of the manifest.
|
See JSON files in `tools/codegen/base` directory for examples of the manifest.
|
||||||
|
|
||||||
3\. Generate manifest with the following command (replace `<tool>` with the tool name).
|
2\. Generate manifest with the following command (replace `<tool>` with the tool name).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./tools/manifest.sh <tool>
|
./tools/manifest.sh <tool>
|
||||||
@@ -23,6 +21,14 @@ See JSON files in `tools/codegen/base` directory for examples of the manifest.
|
|||||||
> GITHUB_TOKEN=$(gh auth status --show-token 2>&1 | sed -n 's/^.*Token: \(.*\)$/\1/p') ./tools/manifest.sh <tool>
|
> GITHUB_TOKEN=$(gh auth status --show-token 2>&1 | sed -n 's/^.*Token: \(.*\)$/\1/p') ./tools/manifest.sh <tool>
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
|
## Refresh TOOLS.md
|
||||||
|
|
||||||
|
To update `TOOLS.md`, run
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./tools/update-markdown.sh
|
||||||
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
If one of the CI builds fails due to a bin path or release asset_name, fix the problem in the base
|
If one of the CI builds fails due to a bin path or release asset_name, fix the problem in the base
|
||||||
|
|||||||
60
README.md
60
README.md
@@ -1,3 +1,4 @@
|
|||||||
|
<!-- omit in toc -->
|
||||||
# install-action
|
# install-action
|
||||||
|
|
||||||
[](https://github.com/taiki-e/install-action/releases/latest)
|
[](https://github.com/taiki-e/install-action/releases/latest)
|
||||||
@@ -74,63 +75,9 @@ Or:
|
|||||||
|
|
||||||
## Supported tools
|
## Supported tools
|
||||||
|
|
||||||
<!--
|
See [TOOLS.md](TOOLS.md) for the list of tools that are installed from manifests managed in this action.
|
||||||
License should use SPDX license identifiers.
|
|
||||||
https://spdx.org/licenses
|
|
||||||
-->
|
|
||||||
|
|
||||||
| Name | Where binaries will be installed | Where will it be installed from | Supported platform | License |
|
If a tool not included in the list above is specified, this action uses [cargo-binstall] as a fallback.
|
||||||
| ---- | -------------------------------- | ------------------------------- | ------------------ | ------- |
|
|
||||||
| [**biome**](https://biomejs.dev)| `/usr/local/bin` | [GitHub Releases](https://github.com/biomejs/biome/releases) | Linux, macOS, Windows | [MIT](https://github.com/biomejs/biome/blob/HEAD/LICENSE) |
|
|
||||||
| [**cargo-audit**](https://github.com/rustsec/rustsec/tree/HEAD/cargo-audit) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustsec/rustsec/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-APACHE) OR [MIT](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-MIT) |
|
|
||||||
| [**cargo-binstall**][cargo-binstall] | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cargo-bins/cargo-binstall/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE) |
|
|
||||||
| [**cargo-careful**](https://github.com/RalfJung/cargo-careful) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/RalfJung/cargo-careful/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/RalfJung/cargo-careful/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/RalfJung/cargo-careful/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**cargo-cyclonedx**](https://github.com/CycloneDX/cyclonedx-rust-cargo) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/CycloneDX/cyclonedx-rust-cargo/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/CycloneDX/cyclonedx-rust-cargo/blob/HEAD/LICENSE) |
|
|
||||||
| [**cargo-deny**](https://github.com/EmbarkStudios/cargo-deny) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/EmbarkStudios/cargo-deny/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/EmbarkStudios/cargo-deny/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/EmbarkStudios/cargo-deny/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**cargo-dinghy**](https://github.com/sonos/dinghy) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sonos/dinghy/releases) | Linux, macOS | [Apache-2.0](https://github.com/sonos/dinghy/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/sonos/dinghy/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**cargo-export**](https://github.com/bazhenov/cargo-export) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bazhenov/cargo-export/releases) | Linux, macOS, Windows | [MIT](https://github.com/bazhenov/cargo-export/blob/HEAD/LICENSE) |
|
|
||||||
| [**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/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-rdme**](https://github.com/orium/cargo-rdme) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/orium/cargo-rdme/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/orium/cargo-rdme/blob/HEAD/LICENSE.md) |
|
|
||||||
| [**cargo-sort**](https://github.com/DevinR528/cargo-sort) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/DevinR528/cargo-sort/releases) | Linux, macOS, Windows | [Apache-2.0 OR MIT](https://github.com/DevinR528/cargo-sort/blob/55ec89082466f6bb246d870a8d56d166a8e1f08b/Cargo.toml#L5) |
|
|
||||||
| [**cargo-spellcheck**](https://github.com/drahnr/cargo-spellcheck) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/drahnr/cargo-spellcheck/releases) | Linux and Windows | [LGPLv2.1](https://github.com/drahnr/cargo-spellcheck/blob/f60c81ad0134c12faf08715f08d14f66e749f6e7/docs/checkers.md#nlprules) |
|
|
||||||
| [**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/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/xd009642/tarpaulin/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**cargo-udeps**](https://github.com/est31/cargo-udeps) | `$CARGO_HOME/bin` | [GitHub Release](https://github.com/est31/cargo-udeps/releases) | Linux, macOS, Windows | [Apache-2.0 OR MIT](https://github.com/est31/cargo-udeps/blob/HEAD/LICENSE) |
|
|
||||||
| [**cargo-valgrind**](https://github.com/jfrimmel/cargo-valgrind) | `$CARGO_HOME/bin` | [GitHub Release](https://github.com/jfrimmel/cargo-valgrind/releases) | Linux, macOS, Windows | [MIT](https://github.com/jfrimmel/cargo-valgrind/blob/HEAD/LICENSE-MIT) or [Apache-2.0](https://github.com/jfrimmel/cargo-valgrind/blob/HEAD/LICENSE-APACHE) |
|
|
||||||
| [**cross**](https://github.com/cross-rs/cross) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cross-rs/cross/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**dprint**](https://github.com/dprint/dprint) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/dprint/dprint/releases) | Linux, macOS, Windows | [MIT](https://github.com/dprint/dprint/blob/HEAD/LICENSE) |
|
|
||||||
| [**espup**](https://github.com/esp-rs/espup) | `$CARGO_HOME/bin` | [GitHub Release](https://github.com/esp-rs/espup/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/esp-rs/espup/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/esp-rs/espup/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**git-cliff**](https://github.com/orhun/git-cliff) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/orhun/git-cliff/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/orhun/git-cliff/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/orhun/git-cliff/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**grcov**](https://github.com/mozilla/grcov) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/mozilla/grcov/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/mozilla/grcov/blob/HEAD/LICENSE-MPL-2.0) |
|
|
||||||
| [**hyperfine**](https://github.com/sharkdp/hyperfine) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sharkdp/hyperfine/releases) | Linux, macOS, Windows | [MIT](https://github.com/sharkdp/hyperfine/blob/HEAD/LICENSE-MIT) or [Apache-2.0](https://github.com/sharkdp/hyperfine/blob/HEAD/LICENSE-APACHE) |
|
|
||||||
| [**just**](https://github.com/casey/just) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/casey/just/releases) | Linux, macOS, Windows | [CC0-1.0](https://github.com/casey/just/blob/HEAD/LICENSE) |
|
|
||||||
| [**mdbook-linkcheck**](https://github.com/Michael-F-Bryan/mdbook-linkcheck) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases) | Linux, macOS, Windows | [MIT](https://github.com/Michael-F-Bryan/mdbook-linkcheck/blob/HEAD/LICENSE) |
|
|
||||||
| [**mdbook**](https://github.com/rust-lang/mdBook) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-lang/mdBook/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/rust-lang/mdBook/blob/HEAD/LICENSE) |
|
|
||||||
| [**nextest**](https://github.com/nextest-rs/nextest) (alias: `cargo-nextest`) | `$CARGO_HOME/bin` | cargo-binstall | Linux, macOS, Windows | [Apache-2.0](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**osv-scanner**]( https://github.com/google/osv-scanner) | `/usr/local/bin` | [GitHub Releases]( https://github.com/google/osv-scanner/releases) | Linux, macOS, Windows | [Apache-2](https://github.com/google/osv-scanner/blob/HEAD/LICENSE) |
|
|
||||||
| [**parse-changelog**](https://github.com/taiki-e/parse-changelog) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/parse-changelog/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**protoc**](https://github.com/protocolbuffers/protobuf) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/protocolbuffers/protobuf/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/HEAD/LICENSE) |
|
|
||||||
| [**sccache**](https://github.com/mozilla/sccache) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/mozilla/sccache/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/mozilla/sccache/blob/HEAD/LICENSE) |
|
|
||||||
| [**shellcheck**](https://www.shellcheck.net) | `/usr/local/bin` | [GitHub Releases](https://github.com/koalaman/shellcheck/releases) | Linux, macOS, Windows | [GPL-3.0-or-later](https://github.com/koalaman/shellcheck/blob/HEAD/LICENSE) |
|
|
||||||
| [**shfmt**](https://github.com/mvdan/sh) | `/usr/local/bin` | [GitHub Releases](https://github.com/mvdan/sh/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/mvdan/sh/blob/HEAD/LICENSE) |
|
|
||||||
| [**syft**](https://github.com/anchore/syft) | `/usr/local/bin` | [Github Releases](https://github.com/anchore/syft/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/anchore/syft/blob/HEAD/LICENSE) |
|
|
||||||
| [**typos**](https://github.com/crate-ci/typos) | `$CARGO_HOME/bin` | [Github Releases](https://github.com/crate-ci/typos/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/crate-ci/typos/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/crate-ci/typos/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**valgrind**](https://valgrind.org) | `/snap/bin` | [snap](https://snapcraft.io/install/valgrind/ubuntu) | Linux | [GPL-2.0-or-later](https://valgrind.org/docs/manual/license.gpl.html) |
|
|
||||||
| [**wasm-bindgen**](https://github.com/rustwasm/wasm-bindgen) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustwasm/wasm-bindgen/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rustwasm/wasm-bindgen/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/rustwasm/wasm-bindgen/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**wasm-pack**](https://github.com/rustwasm/wasm-pack) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustwasm/wasm-pack/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rustwasm/wasm-pack/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/rustwasm/wasm-pack/blob/HEAD/LICENSE-MIT) |
|
|
||||||
| [**wasmtime**](https://github.com/bytecodealliance/wasmtime) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bytecodealliance/wasmtime/releases) | Linux, macOS, Windows | [Apache-2.0 WITH LLVM-exception](https://github.com/bytecodealliance/wasmtime/blob/HEAD/LICENSE) |
|
|
||||||
| [**xbuild**](https://github.com/rust-mobile/xbuild) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-mobile/xbuild/releases) | Linux, macOS, Windows | Apache-2.0 OR MIT |
|
|
||||||
| [**zola**](https://github.com/getzola/zola) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/getzola/zola/releases) | Linux, macOS, Windows | [MIT](https://github.com/getzola/zola/blob/HEAD/LICENSE) |
|
|
||||||
|
|
||||||
If `$CARGO_HOME/bin` is not available, Rust-related binaries will be installed to `$HOME/.cargo/bin`.<br>
|
|
||||||
If `$HOME/.cargo/bin` is not available, Rust-related binaries will be installed to `/usr/local/bin`.<br>
|
|
||||||
If `/usr/local/bin` is not available, binaries will be installed to `$HOME/.install-action/bin`.<br>
|
|
||||||
|
|
||||||
**If a tool not included in the list above is specified, this action uses [cargo-binstall] as a fallback.**
|
|
||||||
|
|
||||||
### Add support for new tool
|
### Add support for new tool
|
||||||
|
|
||||||
@@ -152,7 +99,6 @@ This action has been tested for GitHub-hosted runners (Ubuntu, macOS, Windows) a
|
|||||||
To use this action in self-hosted runners or in containers, at least the following tools are required:
|
To use this action in self-hosted runners or in containers, at least the following tools are required:
|
||||||
|
|
||||||
- bash
|
- bash
|
||||||
- cargo (if you use cargo-binstall fallback)
|
|
||||||
|
|
||||||
## Related Projects
|
## Related Projects
|
||||||
|
|
||||||
|
|||||||
59
TOOLS.md
Normal file
59
TOOLS.md
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# Tools
|
||||||
|
|
||||||
|
This is a list of tools that are installed from manifests managed in this action.
|
||||||
|
|
||||||
|
If a tool not included in the list below is specified, this action uses [cargo-binstall] as a fallback.
|
||||||
|
|
||||||
|
> If `$CARGO_HOME/bin` is not available, Rust-related binaries will be installed to `$HOME/.cargo/bin`.<br>
|
||||||
|
> If `$HOME/.cargo/bin` is not available, Rust-related binaries will be installed to `/usr/local/bin`.<br>
|
||||||
|
> If `/usr/local/bin` is not available, binaries will be installed to `$HOME/.install-action/bin`.<br>
|
||||||
|
|
||||||
|
| Name | Where binaries will be installed | Where will it be installed from | Supported platform | License |
|
||||||
|
| ---- | -------------------------------- | ------------------------------- | ------------------ | ------- |
|
||||||
|
| [**biome**](https://biomejs.dev) | `/usr/local/bin` | [GitHub Releases](https://github.com/biomejs/biome/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/biomejs/biome/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/biomejs/biome/blob/main/LICENSE-MIT) |
|
||||||
|
| [**cargo-audit**](https://github.com/rustsec/rustsec/tree/HEAD/cargo-audit) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustsec/rustsec/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-APACHE) OR [MIT](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-MIT) |
|
||||||
|
| [**cargo-binstall**](https://github.com/cargo-bins/cargo-binstall) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cargo-bins/cargo-binstall/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE) |
|
||||||
|
| [**cargo-careful**](https://github.com/RalfJung/cargo-careful) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/RalfJung/cargo-careful/releases) | Linux, macOS, Windows | [MIT](https://github.com/RalfJung/cargo-careful/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/RalfJung/cargo-careful/blob/master/LICENSE-APACHE) |
|
||||||
|
| [**cargo-cyclonedx**](https://github.com/CycloneDX/cyclonedx-rust-cargo) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/CycloneDX/cyclonedx-rust-cargo/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/CycloneDX/cyclonedx-rust-cargo/blob/main/LICENSE) |
|
||||||
|
| [**cargo-deny**](https://github.com/EmbarkStudios/cargo-deny) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/EmbarkStudios/cargo-deny/releases) | Linux, macOS, Windows | [MIT](https://github.com/EmbarkStudios/cargo-deny/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/EmbarkStudios/cargo-deny/blob/main/LICENSE-APACHE) |
|
||||||
|
| [**cargo-dinghy**](https://github.com/sonos/dinghy) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sonos/dinghy/releases) | Linux, macOS | [MIT](https://github.com/sonos/dinghy/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/sonos/dinghy/blob/main/LICENSE-APACHE) |
|
||||||
|
| [**cargo-export**](https://github.com/bazhenov/cargo-export) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bazhenov/cargo-export/releases) | Linux, macOS, Windows | [MIT](https://github.com/bazhenov/cargo-export/blob/master/LICENSE) |
|
||||||
|
| [**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/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-hack/blob/main/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/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-llvm-cov/blob/main/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/main/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-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/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-minimal-versions/blob/main/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/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-no-dev-deps/blob/main/LICENSE-MIT) |
|
||||||
|
| [**cargo-rdme**](https://github.com/orium/cargo-rdme) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/orium/cargo-rdme/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/orium/cargo-rdme/blob/main/LICENSE.md) |
|
||||||
|
| [**cargo-sort**](https://github.com/DevinR528/cargo-sort) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/DevinR528/cargo-sort/releases) | Linux, macOS, Windows | [Apache-2.0 OR MIT](https://github.com/DevinR528/cargo-sort/blob/55ec89082466f6bb246d870a8d56d166a8e1f08b/Cargo.toml#L5) |
|
||||||
|
| [**cargo-spellcheck**](https://github.com/drahnr/cargo-spellcheck) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/drahnr/cargo-spellcheck/releases) | Linux, Windows | [LGPLv2.1](https://github.com/drahnr/cargo-spellcheck/blob/master/LICENSE-LGPL) |
|
||||||
|
| [**cargo-tarpaulin**](https://github.com/xd009642/tarpaulin) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/xd009642/tarpaulin/releases) | Linux, macOS, Windows | [MIT](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-MIT) OR [Apache-2.0](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-APACHE) |
|
||||||
|
| [**cargo-udeps**](https://github.com/est31/cargo-udeps) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/est31/cargo-udeps/releases) | Linux, macOS, Windows | [Apache-2.0 OR MIT](https://github.com/est31/cargo-udeps/blob/HEAD/LICENSE) |
|
||||||
|
| [**cargo-valgrind**](https://github.com/jfrimmel/cargo-valgrind) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/jfrimmel/cargo-valgrind/releases) | Linux, macOS, Windows | [MIT](https://github.com/jfrimmel/cargo-valgrind/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/jfrimmel/cargo-valgrind/blob/master/LICENSE-APACHE) |
|
||||||
|
| [**cross**](https://github.com/cross-rs/cross) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cross-rs/cross/releases) | Linux, macOS, Windows | [MIT](https://github.com/cross-rs/cross/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/cross-rs/cross/blob/main/LICENSE-APACHE) |
|
||||||
|
| [**dprint**](https://github.com/dprint/dprint) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/dprint/dprint/releases) | Linux, macOS, Windows | [MIT](https://github.com/dprint/dprint/blob/main/LICENSE) |
|
||||||
|
| [**editorconfig-checker**](https://github.com/editorconfig-checker/editorconfig-checker) | `/usr/local/bin` | [GitHub Releases](https://github.com/editorconfig-checker/editorconfig-checker/releases) | Linux, macOS, Windows | [MIT](https://github.com/editorconfig-checker/editorconfig-checker/blob/main/LICENSE) |
|
||||||
|
| [**espup**](https://github.com/esp-rs/espup) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/esp-rs/espup/releases) | Linux, macOS, Windows | [MIT](https://github.com/esp-rs/espup/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/esp-rs/espup/blob/main/LICENSE-APACHE) |
|
||||||
|
| [**git-cliff**](https://github.com/orhun/git-cliff) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/orhun/git-cliff/releases) | Linux, macOS, Windows | [MIT](https://github.com/orhun/git-cliff/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/orhun/git-cliff/blob/main/LICENSE-APACHE) |
|
||||||
|
| [**grcov**](https://github.com/mozilla/grcov) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/mozilla/grcov/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/mozilla/grcov/blob/HEAD/LICENSE-MPL-2.0) |
|
||||||
|
| [**hyperfine**](https://github.com/sharkdp/hyperfine) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sharkdp/hyperfine/releases) | Linux, macOS, Windows | [MIT](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-APACHE) |
|
||||||
|
| [**just**](https://github.com/casey/just) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/casey/just/releases) | Linux, macOS, Windows | [CC0-1.0](https://github.com/casey/just/blob/master/LICENSE) |
|
||||||
|
| [**mdbook**](https://github.com/rust-lang/mdBook) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-lang/mdBook/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/rust-lang/mdBook/blob/master/LICENSE) |
|
||||||
|
| [**mdbook-linkcheck**](https://github.com/Michael-F-Bryan/mdbook-linkcheck) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases) | Linux, macOS, Windows | [MIT](https://github.com/Michael-F-Bryan/mdbook-linkcheck/blob/master/LICENSE) |
|
||||||
|
| [**nextest**](https://nexte.st/) (alias: `cargo-nextest`)| `$CARGO_HOME/bin` | `cargo-binstall` | Linux, macOS, Windows | [Apache-2.0](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-MIT) |
|
||||||
|
| [**osv-scanner**](https://github.com/google/osv-scanner) | `/usr/local/bin` | [GitHub Releases](https://github.com/google/osv-scanner/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/google/osv-scanner/blob/main/LICENSE) |
|
||||||
|
| [**parse-changelog**](https://github.com/taiki-e/parse-changelog) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/parse-changelog/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-MIT) |
|
||||||
|
| [**protoc**](https://github.com/protocolbuffers/protobuf) | `/usr/local/bin` | [GitHub Releases](https://github.com/protocolbuffers/protobuf/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/HEAD/LICENSE) |
|
||||||
|
| [**sccache**](https://github.com/mozilla/sccache) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/mozilla/sccache/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/mozilla/sccache/blob/main/LICENSE) |
|
||||||
|
| [**shellcheck**](https://www.shellcheck.net) | `/usr/local/bin` | [GitHub Releases](https://github.com/koalaman/shellcheck/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/koalaman/shellcheck/blob/master/LICENSE) |
|
||||||
|
| [**shfmt**](https://github.com/mvdan/sh) | `/usr/local/bin` | [GitHub Releases](https://github.com/mvdan/sh/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/mvdan/sh/blob/master/LICENSE) |
|
||||||
|
| [**syft**](https://github.com/anchore/syft) | `/usr/local/bin` | [GitHub Releases](https://github.com/anchore/syft/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/anchore/syft/blob/main/LICENSE) |
|
||||||
|
| [**typos**](https://github.com/crate-ci/typos) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/crate-ci/typos/releases) | Linux, macOS, Windows | [MIT](https://github.com/crate-ci/typos/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/crate-ci/typos/blob/master/LICENSE-APACHE) |
|
||||||
|
| [**valgrind**](https://valgrind.org/) | `/snap/bin` | [snap](https://snapcraft.io/install/valgrind/ubuntu) | Linux | [GPL-2.0](https://sourceware.org/git/?p=valgrind.git;a=blob;f=COPYING;hb=HEAD) |
|
||||||
|
| [**wasm-bindgen**](https://github.com/rustwasm/wasm-bindgen) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustwasm/wasm-bindgen/releases) | Linux, macOS, Windows | [MIT](https://github.com/rustwasm/wasm-bindgen/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/rustwasm/wasm-bindgen/blob/main/LICENSE-APACHE) |
|
||||||
|
| [**wasm-pack**](https://github.com/rustwasm/wasm-pack) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustwasm/wasm-pack/releases) | Linux, macOS, Windows | [MIT](https://github.com/rustwasm/wasm-pack/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/rustwasm/wasm-pack/blob/master/LICENSE-APACHE) |
|
||||||
|
| [**wasmtime**](https://github.com/bytecodealliance/wasmtime) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bytecodealliance/wasmtime/releases) | Linux, macOS, Windows | [Apache-2.0 WITH LLVM-exception](https://github.com/bytecodealliance/wasmtime/blob/main/LICENSE) |
|
||||||
|
| [**xbuild**](https://github.com/rust-mobile/xbuild) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-mobile/xbuild/releases) | Linux, macOS, Windows | [Apache-2.0 OR MIT](https://github.com/rust-mobile/xbuild/blob/268939a99a50d7927bce3e343e5d2ed32eb8b30e/xbuild/Cargo.toml#L7) |
|
||||||
|
| [**zola**](https://github.com/getzola/zola) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/getzola/zola/releases) | Linux, macOS, Windows | [MIT](https://github.com/getzola/zola/blob/master/LICENSE) |
|
||||||
|
|
||||||
|
[cargo-binstall]: https://github.com/cargo-bins/cargo-binstall
|
||||||
8
main.sh
8
main.sh
@@ -748,5 +748,11 @@ if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
|
|||||||
# By default, cargo-binstall enforce downloads over secure transports only.
|
# By default, cargo-binstall enforce downloads over secure transports only.
|
||||||
# As a result, http will be disabled, and it will also set
|
# As a result, http will be disabled, and it will also set
|
||||||
# min tls version to be 1.2
|
# min tls version to be 1.2
|
||||||
cargo binstall --force --no-confirm --locked "${unsupported_tools[@]}"
|
cargo-binstall binstall --force --no-confirm --locked "${unsupported_tools[@]}"
|
||||||
|
if ! type -P cargo >/dev/null; then
|
||||||
|
_bin_dir=$(canonicalize_windows_path "${HOME}/.cargo/bin")
|
||||||
|
# TODO: avoid this when already added
|
||||||
|
info "adding '${_bin_dir}' to PATH"
|
||||||
|
echo "${_bin_dir}" >>"${GITHUB_PATH}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
28
manifests/biome.json
generated
28
manifests/biome.json
generated
@@ -34,11 +34,35 @@
|
|||||||
"bin": "biome.exe"
|
"bin": "biome.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/biomejs/biome/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/biomejs/biome/blob/main/LICENSE-MIT)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.7.3"
|
"version": "1.8.0"
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"version": "1.7.3"
|
"version": "1.8.0"
|
||||||
|
},
|
||||||
|
"1.8": {
|
||||||
|
"version": "1.8.0"
|
||||||
|
},
|
||||||
|
"1.8.0": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "02130f183b65583da5eb4cb8ca023c8565b5e8613904f65a8dd7f02755d66ee2"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "a42d7dc5642d15561b96bffd4a95ee8f644a90ba1d654fdeb1c7040e6d52d2ae"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "087de9c67effdf9d99ca9700d1a9b7fbefc0d493b5d328322524b4fbddda4a10"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "806bce8f838139011f97942e0cb3dfe385858c7bdbbbbac4a2c128b4d7239a41"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "3ed5faee598c576b306d968f3da442e56e5710e05f146ca74182649ed1c94dd0"
|
||||||
|
},
|
||||||
|
"aarch64_windows": {
|
||||||
|
"checksum": "7f11c2bab3412e06b3c12232e1df3e68dbc5be104f889f1f2bba3aba9bb4db67"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"1.7": {
|
"1.7": {
|
||||||
"version": "1.7.3"
|
"version": "1.7.3"
|
||||||
|
|||||||
1
manifests/cargo-audit.json
generated
1
manifests/cargo-audit.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"bin": "cargo-audit-aarch64-unknown-linux-gnu-v${version}/cargo-audit"
|
"bin": "cargo-audit-aarch64-unknown-linux-gnu-v${version}/cargo-audit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-APACHE) OR [MIT](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-MIT)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.20.0"
|
"version": "0.20.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-binstall.json
generated
1
manifests/cargo-binstall.json
generated
@@ -20,6 +20,7 @@
|
|||||||
"url": "https://github.com/cargo-bins/cargo-binstall/releases/download/v${version}/cargo-binstall-aarch64-pc-windows-msvc.zip"
|
"url": "https://github.com/cargo-bins/cargo-binstall/releases/download/v${version}/cargo-binstall-aarch64-pc-windows-msvc.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.6.8"
|
"version": "1.6.8"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-careful.json
generated
1
manifests/cargo-careful.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"url": "https://github.com/RalfJung/cargo-careful/releases/download/v${version}/cargo-careful.exe"
|
"url": "https://github.com/RalfJung/cargo-careful/releases/download/v${version}/cargo-careful.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/RalfJung/cargo-careful/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/RalfJung/cargo-careful/blob/master/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.4.2"
|
"version": "0.4.2"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-cyclonedx.json
generated
1
manifests/cargo-cyclonedx.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-Win-x86_64.zip"
|
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-Win-x86_64.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/CycloneDX/cyclonedx-rust-cargo/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.5.0"
|
"version": "0.5.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-deny.json
generated
1
manifests/cargo-deny.json
generated
@@ -22,6 +22,7 @@
|
|||||||
"bin": "cargo-deny-${version}-aarch64-apple-darwin/cargo-deny"
|
"bin": "cargo-deny-${version}-aarch64-apple-darwin/cargo-deny"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/EmbarkStudios/cargo-deny/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/EmbarkStudios/cargo-deny/blob/main/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.14.24"
|
"version": "0.14.24"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-dinghy.json
generated
1
manifests/cargo-dinghy.json
generated
@@ -10,6 +10,7 @@
|
|||||||
"bin": "cargo-dinghy-${version}/cargo-dinghy"
|
"bin": "cargo-dinghy-${version}/cargo-dinghy"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/sonos/dinghy/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/sonos/dinghy/blob/main/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.7.1"
|
"version": "0.7.1"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-export.json
generated
1
manifests/cargo-export.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"bin": "cargo-export-v${version}-aarch64-apple-darwin/bin/cargo-export"
|
"bin": "cargo-export-v${version}-aarch64-apple-darwin/bin/cargo-export"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/bazhenov/cargo-export/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.2.5"
|
"version": "0.2.5"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-hack.json
generated
1
manifests/cargo-hack.json
generated
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"rust_crate": "cargo-hack",
|
"rust_crate": "cargo-hack",
|
||||||
"template": null,
|
"template": null,
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/cargo-hack/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-hack/blob/main/LICENSE-MIT)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.6.28"
|
"version": "0.6.28"
|
||||||
},
|
},
|
||||||
|
|||||||
22
manifests/cargo-llvm-cov.json
generated
22
manifests/cargo-llvm-cov.json
generated
@@ -17,11 +17,29 @@
|
|||||||
"url": "https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${version}/cargo-llvm-cov-aarch64-apple-darwin.tar.gz"
|
"url": "https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${version}/cargo-llvm-cov-aarch64-apple-darwin.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/cargo-llvm-cov/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-llvm-cov/blob/main/LICENSE-MIT)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.6.9"
|
"version": "0.6.10"
|
||||||
},
|
},
|
||||||
"0.6": {
|
"0.6": {
|
||||||
"version": "0.6.9"
|
"version": "0.6.10"
|
||||||
|
},
|
||||||
|
"0.6.10": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "2350d7d6586c8b1ac828ad5578225fafb6a43fa9c35fe835c28a5ed63499df60"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "6355b4536798ba0cea459729cc531f7bbf252d51c86b02683c0b4a4033d8cb96"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "3090e71ba2c0e16e593d338f4ed696f3829544f53dea63bdd966398f4379259c"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "7921682e7bd925b69bbecaf9bf42f99a6404ef60049b1a9f87fe97dc697265f4"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "46fe1d529755ca1a39dc7995374eef4482a20f0f632dd113430641c06fc4b466"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"0.6.9": {
|
"0.6.9": {
|
||||||
"x86_64_linux_musl": {
|
"x86_64_linux_musl": {
|
||||||
|
|||||||
1
manifests/cargo-machete.json
generated
1
manifests/cargo-machete.json
generated
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"rust_crate": "cargo-machete",
|
"rust_crate": "cargo-machete",
|
||||||
"template": null,
|
"template": null,
|
||||||
|
"license_markdown": "[MIT](https://github.com/bnjbvr/cargo-machete/blob/main/LICENSE.md)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.6.2"
|
"version": "0.6.2"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-make.json
generated
1
manifests/cargo-make.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"bin": "cargo-make-v${version}-aarch64-apple-darwin/cargo-make"
|
"bin": "cargo-make-v${version}-aarch64-apple-darwin/cargo-make"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/sagiegurari/cargo-make/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.37.12"
|
"version": "0.37.12"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-minimal-versions.json
generated
1
manifests/cargo-minimal-versions.json
generated
@@ -20,6 +20,7 @@
|
|||||||
"url": "https://github.com/taiki-e/cargo-minimal-versions/releases/download/v${version}/cargo-minimal-versions-aarch64-pc-windows-msvc.tar.gz"
|
"url": "https://github.com/taiki-e/cargo-minimal-versions/releases/download/v${version}/cargo-minimal-versions-aarch64-pc-windows-msvc.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/cargo-minimal-versions/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-minimal-versions/blob/main/LICENSE-MIT)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.1.27"
|
"version": "0.1.27"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-no-dev-deps.json
generated
1
manifests/cargo-no-dev-deps.json
generated
@@ -20,6 +20,7 @@
|
|||||||
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-aarch64-pc-windows-msvc.tar.gz"
|
"url": "https://github.com/taiki-e/cargo-no-dev-deps/releases/download/v${version}/cargo-no-dev-deps-aarch64-pc-windows-msvc.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/cargo-no-dev-deps/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-no-dev-deps/blob/main/LICENSE-MIT)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.2.12"
|
"version": "0.2.12"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-rdme.json
generated
1
manifests/cargo-rdme.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"url": "https://github.com/orium/cargo-rdme/releases/download/v${version}/cargo-rdme_v${version}_x86_64-pc-windows-gnu.zip"
|
"url": "https://github.com/orium/cargo-rdme/releases/download/v${version}/cargo-rdme_v${version}_x86_64-pc-windows-gnu.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MPL-2.0](https://github.com/orium/cargo-rdme/blob/main/LICENSE.md)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.4.2"
|
"version": "1.4.2"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-sort.json
generated
1
manifests/cargo-sort.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"url": "https://github.com/DevinR528/cargo-sort/releases/download/v${version}/cargo-sort-x86_64-pc-windows-msvc.zip"
|
"url": "https://github.com/DevinR528/cargo-sort/releases/download/v${version}/cargo-sort-x86_64-pc-windows-msvc.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0 OR MIT](https://github.com/DevinR528/cargo-sort/blob/55ec89082466f6bb246d870a8d56d166a8e1f08b/Cargo.toml#L5)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.0.9"
|
"version": "1.0.9"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-spellcheck.json
generated
1
manifests/cargo-spellcheck.json
generated
@@ -8,6 +8,7 @@
|
|||||||
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/cargo-spellcheck-v${version}-x86_64-pc-windows-gnu.exe"
|
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/cargo-spellcheck-v${version}-x86_64-pc-windows-gnu.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[LGPLv2.1](https://github.com/drahnr/cargo-spellcheck/blob/master/LICENSE-LGPL)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.14.0"
|
"version": "0.14.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-tarpaulin.json
generated
1
manifests/cargo-tarpaulin.json
generated
@@ -17,6 +17,7 @@
|
|||||||
"url": "https://github.com/xd009642/tarpaulin/releases/download/${version}/cargo-tarpaulin-aarch64-apple-darwin.tar.gz"
|
"url": "https://github.com/xd009642/tarpaulin/releases/download/${version}/cargo-tarpaulin-aarch64-apple-darwin.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-MIT) OR [Apache-2.0](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.30.0"
|
"version": "0.30.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-udeps.json
generated
1
manifests/cargo-udeps.json
generated
@@ -30,6 +30,7 @@
|
|||||||
"bin": "./cargo-udeps-v${version}-aarch64-pc-windows-msvc/cargo-udeps.exe"
|
"bin": "./cargo-udeps-v${version}-aarch64-pc-windows-msvc/cargo-udeps.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0 OR MIT](https://github.com/est31/cargo-udeps/blob/HEAD/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.1.47"
|
"version": "0.1.47"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cargo-valgrind.json
generated
1
manifests/cargo-valgrind.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"url": "https://github.com/jfrimmel/cargo-valgrind/releases/download/v${version}/cargo-valgrind-${version}-x86_64-pc-windows-msvc.zip"
|
"url": "https://github.com/jfrimmel/cargo-valgrind/releases/download/v${version}/cargo-valgrind-${version}-x86_64-pc-windows-msvc.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/jfrimmel/cargo-valgrind/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/jfrimmel/cargo-valgrind/blob/master/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "2.1.0"
|
"version": "2.1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/cross.json
generated
1
manifests/cross.json
generated
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"rust_crate": "cross",
|
"rust_crate": "cross",
|
||||||
"template": null,
|
"template": null,
|
||||||
|
"license_markdown": "[MIT](https://github.com/cross-rs/cross/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/cross-rs/cross/blob/main/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.2.5"
|
"version": "0.2.5"
|
||||||
},
|
},
|
||||||
|
|||||||
22
manifests/dprint.json
generated
22
manifests/dprint.json
generated
@@ -23,11 +23,29 @@
|
|||||||
"url": "https://github.com/dprint/dprint/releases/download/${version}/dprint-aarch64-apple-darwin.zip"
|
"url": "https://github.com/dprint/dprint/releases/download/${version}/dprint-aarch64-apple-darwin.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/dprint/dprint/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.46.0"
|
"version": "0.46.1"
|
||||||
},
|
},
|
||||||
"0.46": {
|
"0.46": {
|
||||||
"version": "0.46.0"
|
"version": "0.46.1"
|
||||||
|
},
|
||||||
|
"0.46.1": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "4a7d6fa6b920ab150f580965556086cdd7992e07078e627ab9a9d1c3bd30ba85"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "cdea84bce1d84c26e8eced2265d246b79a849ec2e7d1377d98dd7bdb21c7ce83"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "74e5ab38c744d5903862c2b5174d0fef9759b5506da775e1fb93b6a68c63101d"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "e2b6d87167d21f1f01571790e79526ef9caff3b8b75f5cac348c4f06f60a8c16"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "f3ff4faef83d14c3b4ae262e79a40d4e0fc3fa1903d0b6e9b82f0b25b00e9499"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"0.46.0": {
|
"0.46.0": {
|
||||||
"x86_64_linux_musl": {
|
"x86_64_linux_musl": {
|
||||||
|
|||||||
1
manifests/editorconfig-checker.json
generated
1
manifests/editorconfig-checker.json
generated
@@ -26,6 +26,7 @@
|
|||||||
"bin": "bin/ec-windows-arm64.exe"
|
"bin": "bin/ec-windows-arm64.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/editorconfig-checker/editorconfig-checker/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "3.0.1"
|
"version": "3.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/espup.json
generated
1
manifests/espup.json
generated
@@ -17,6 +17,7 @@
|
|||||||
"url": "https://github.com/esp-rs/espup/releases/download/v${version}/espup-aarch64-apple-darwin.zip"
|
"url": "https://github.com/esp-rs/espup/releases/download/v${version}/espup-aarch64-apple-darwin.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/esp-rs/espup/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/esp-rs/espup/blob/main/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.11.0"
|
"version": "0.11.0"
|
||||||
},
|
},
|
||||||
|
|||||||
28
manifests/git-cliff.json
generated
28
manifests/git-cliff.json
generated
@@ -26,11 +26,35 @@
|
|||||||
"bin": "git-cliff-${version}/git-cliff.exe"
|
"bin": "git-cliff-${version}/git-cliff.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/orhun/git-cliff/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/orhun/git-cliff/blob/main/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "2.2.2"
|
"version": "2.3.0"
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
"version": "2.2.2"
|
"version": "2.3.0"
|
||||||
|
},
|
||||||
|
"2.3": {
|
||||||
|
"version": "2.3.0"
|
||||||
|
},
|
||||||
|
"2.3.0": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "0371c0c2fd948a711d05198f719a2ec8ccb2a43ae5e4760394916d5cf6b45c6c"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "73ce46c671a593fe1acef725e7816c793968e3c315fd72107280e830eaa55820"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "90bc9c60b5db44a62fae51fb09e9565e2d460e107df3404ac5384a2f0bdd96d1"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "aed0a6fba4d5b309be98ef71db75928c84c57495d46843791e95870582f0d1a6"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "1fd8e277212db52c791a20b6ecdb993ce47884a1aca3ee3d31066fd29acea6bb"
|
||||||
|
},
|
||||||
|
"aarch64_windows": {
|
||||||
|
"checksum": "059a29642ffe16ad720cb383290564df35bddd329fa34f6d1d1a4f633d6dad48"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"2.2": {
|
"2.2": {
|
||||||
"version": "2.2.2"
|
"version": "2.2.2"
|
||||||
|
|||||||
1
manifests/grcov.json
generated
1
manifests/grcov.json
generated
@@ -17,6 +17,7 @@
|
|||||||
"url": "https://github.com/mozilla/grcov/releases/download/v${version}/grcov-aarch64-apple-darwin.tar.bz2"
|
"url": "https://github.com/mozilla/grcov/releases/download/v${version}/grcov-aarch64-apple-darwin.tar.bz2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MPL-2.0](https://github.com/mozilla/grcov/blob/HEAD/LICENSE-MPL-2.0)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.8.19"
|
"version": "0.8.19"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/hyperfine.json
generated
1
manifests/hyperfine.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"bin": "hyperfine-v${version}-aarch64-unknown-linux-gnu/hyperfine"
|
"bin": "hyperfine-v${version}-aarch64-unknown-linux-gnu/hyperfine"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.18.0"
|
"version": "1.18.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/just.json
generated
1
manifests/just.json
generated
@@ -17,6 +17,7 @@
|
|||||||
"url": "https://github.com/casey/just/releases/download/${version}/just-${version}-aarch64-apple-darwin.tar.gz"
|
"url": "https://github.com/casey/just/releases/download/${version}/just-${version}-aarch64-apple-darwin.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[CC0-1.0](https://github.com/casey/just/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.27.0"
|
"version": "1.27.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/mdbook-linkcheck.json
generated
1
manifests/mdbook-linkcheck.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"url": "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v${version}/mdbook-linkcheck.x86_64-pc-windows-msvc.zip"
|
"url": "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v${version}/mdbook-linkcheck.x86_64-pc-windows-msvc.zip"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/Michael-F-Bryan/mdbook-linkcheck/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.7.7"
|
"version": "0.7.7"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/mdbook.json
generated
1
manifests/mdbook.json
generated
@@ -17,6 +17,7 @@
|
|||||||
"url": "https://github.com/rust-lang/mdBook/releases/download/v${version}/mdbook-v${version}-aarch64-unknown-linux-musl.tar.gz"
|
"url": "https://github.com/rust-lang/mdBook/releases/download/v${version}/mdbook-v${version}-aarch64-unknown-linux-musl.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MPL-2.0](https://github.com/rust-lang/mdBook/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.4.40"
|
"version": "0.4.40"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/osv-scanner.json
generated
1
manifests/osv-scanner.json
generated
@@ -20,6 +20,7 @@
|
|||||||
"url": "https://github.com/google/osv-scanner/releases/download/v${version}/osv-scanner_${version}_windows_arm64.exe"
|
"url": "https://github.com/google/osv-scanner/releases/download/v${version}/osv-scanner_${version}_windows_arm64.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/google/osv-scanner/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.6.2"
|
"version": "1.6.2"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/parse-changelog.json
generated
1
manifests/parse-changelog.json
generated
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"rust_crate": "parse-changelog",
|
"rust_crate": "parse-changelog",
|
||||||
"template": null,
|
"template": null,
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-MIT)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.6.8"
|
"version": "0.6.8"
|
||||||
},
|
},
|
||||||
|
|||||||
25
manifests/protoc.json
generated
25
manifests/protoc.json
generated
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"rust_crate": null,
|
"rust_crate": null,
|
||||||
"template": null,
|
"template": null,
|
||||||
|
"license_markdown": "[BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/HEAD/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "3.27.0"
|
"version": "3.27.0"
|
||||||
},
|
},
|
||||||
@@ -397,7 +398,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"3.22": {
|
"3.22": {
|
||||||
"version": "3.22.4"
|
"version": "3.22.5"
|
||||||
|
},
|
||||||
|
"3.22.5": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.5/protoc-22.5-linux-x86_64.zip",
|
||||||
|
"checksum": "c11692013bbffb7c257de7f82cd02d323700ebcdb8a4923ed02fea812f70f5e3"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.5/protoc-22.5-osx-x86_64.zip",
|
||||||
|
"checksum": "3edd0c65e2a8efc83f24918db27e1bbc72f3abe7618cb4cfb1842630a830b562"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.5/protoc-22.5-win64.zip",
|
||||||
|
"checksum": "f99d1e9e28f7704b22d4254fab293477ea0d4ef3e5b9aa940a8fccfc99c1ce4c"
|
||||||
|
},
|
||||||
|
"aarch64_linux_gnu": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.5/protoc-22.5-linux-aarch_64.zip",
|
||||||
|
"checksum": "1890f845b333fe040ec002a659a4ff7515cd93f8db0066c3885d1fce9f70b208"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.5/protoc-22.5-osx-aarch_64.zip",
|
||||||
|
"checksum": "b7fc6c6099ad10149d90f8b107871537ca030980354b402d8e034055ce082b77"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"3.22.4": {
|
"3.22.4": {
|
||||||
"x86_64_linux_gnu": {
|
"x86_64_linux_gnu": {
|
||||||
|
|||||||
1
manifests/sccache.json
generated
1
manifests/sccache.json
generated
@@ -22,6 +22,7 @@
|
|||||||
"bin": "sccache-v${version}-aarch64-apple-darwin/sccache"
|
"bin": "sccache-v${version}-aarch64-apple-darwin/sccache"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/mozilla/sccache/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.8.1"
|
"version": "0.8.1"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/shellcheck.json
generated
1
manifests/shellcheck.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"bin": "shellcheck-v${version}/shellcheck"
|
"bin": "shellcheck-v${version}/shellcheck"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[GPL-3.0](https://github.com/koalaman/shellcheck/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.10.0"
|
"version": "0.10.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/shfmt.json
generated
1
manifests/shfmt.json
generated
@@ -17,6 +17,7 @@
|
|||||||
"url": "https://github.com/mvdan/sh/releases/download/v${version}/shfmt_v${version}_darwin_arm64"
|
"url": "https://github.com/mvdan/sh/releases/download/v${version}/shfmt_v${version}_darwin_arm64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[BSD-3-Clause](https://github.com/mvdan/sh/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "3.8.0"
|
"version": "3.8.0"
|
||||||
},
|
},
|
||||||
|
|||||||
25
manifests/syft.json
generated
25
manifests/syft.json
generated
@@ -22,11 +22,32 @@
|
|||||||
"bin": "syft"
|
"bin": "syft"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/anchore/syft/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.4.1"
|
"version": "1.5.0"
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"version": "1.4.1"
|
"version": "1.5.0"
|
||||||
|
},
|
||||||
|
"1.5": {
|
||||||
|
"version": "1.5.0"
|
||||||
|
},
|
||||||
|
"1.5.0": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "3d10023d46dfaf0fe75288df207b478b43597f7d2fff553f58430817166bd478"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "605322e3e7043a4f2f3d6e37f75a71389d38f6f290bff2e54bb2aaebbbf4829b"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "5079c6a88e130f8677d0701cb2689f9eae2088022ecf5fa2b9f341b96d9983d2"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "ee2b1289a1e4b0de9409c3a78867949ca42788a5f50072b8a6e6e04e6a269f9c"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "fe02d072e7ec9a8eb4ac866ba973396a8beae79829ee870acaadd4d862e5e65a"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"1.4": {
|
"1.4": {
|
||||||
"version": "1.4.1"
|
"version": "1.4.1"
|
||||||
|
|||||||
22
manifests/typos.json
generated
22
manifests/typos.json
generated
@@ -14,11 +14,29 @@
|
|||||||
"url": "https://github.com/crate-ci/typos/releases/download/v${version}/typos-v${version}-aarch64-apple-darwin.tar.gz"
|
"url": "https://github.com/crate-ci/typos/releases/download/v${version}/typos-v${version}-aarch64-apple-darwin.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/crate-ci/typos/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/crate-ci/typos/blob/master/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.21.0"
|
"version": "1.22.0"
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"version": "1.21.0"
|
"version": "1.22.0"
|
||||||
|
},
|
||||||
|
"1.22": {
|
||||||
|
"version": "1.22.0"
|
||||||
|
},
|
||||||
|
"1.22.0": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "bfa037cb884797da229768751642191128a8096f34a77c2c2aab81f4ea4add5e"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "5cede24a0c7e7fa826372346ae8a1eb7264741412cf830acb7bd6ba9d261e610"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "cded62aca581b5610a8a8ac88d26c84bbbf02cd988fca64be50da6beb7d6ad85"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "e747252644b76cca8b7c4bf3a36835186773500a2d1964ffe7341bd33ffdfbe2"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"1.21": {
|
"1.21": {
|
||||||
"version": "1.21.0"
|
"version": "1.21.0"
|
||||||
|
|||||||
1
manifests/wasm-bindgen.json
generated
1
manifests/wasm-bindgen.json
generated
@@ -42,6 +42,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/rustwasm/wasm-bindgen/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/rustwasm/wasm-bindgen/blob/main/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.2.92"
|
"version": "0.2.92"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/wasm-pack.json
generated
1
manifests/wasm-pack.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"bin": "wasm-pack-v${version}-aarch64-unknown-linux-musl/wasm-pack"
|
"bin": "wasm-pack-v${version}-aarch64-unknown-linux-musl/wasm-pack"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/rustwasm/wasm-pack/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/rustwasm/wasm-pack/blob/master/LICENSE-APACHE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.12.1"
|
"version": "0.12.1"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/wasmtime.json
generated
1
manifests/wasmtime.json
generated
@@ -22,6 +22,7 @@
|
|||||||
"bin": "wasmtime-v${version}-aarch64-macos/wasmtime"
|
"bin": "wasmtime-v${version}-aarch64-macos/wasmtime"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0 WITH LLVM-exception](https://github.com/bytecodealliance/wasmtime/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "21.0.1"
|
"version": "21.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/xbuild.json
generated
1
manifests/xbuild.json
generated
@@ -14,6 +14,7 @@
|
|||||||
"bin": "xbuild-windows-x64.exe"
|
"bin": "xbuild-windows-x64.exe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[Apache-2.0 OR MIT](https://github.com/rust-mobile/xbuild/blob/268939a99a50d7927bce3e343e5d2ed32eb8b30e/xbuild/Cargo.toml#L7)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.2.0"
|
"version": "0.2.0"
|
||||||
},
|
},
|
||||||
|
|||||||
1
manifests/zola.json
generated
1
manifests/zola.json
generated
@@ -14,6 +14,7 @@
|
|||||||
"url": "https://github.com/getzola/zola/releases/download/v${version}/zola-v${version}-aarch64-apple-darwin.tar.gz"
|
"url": "https://github.com/getzola/zola/releases/download/v${version}/zola-v${version}-aarch64-apple-darwin.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/getzola/zola/blob/master/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.18.0"
|
"version": "0.18.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -128,17 +128,14 @@ case "${host_os}" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# cargo-binstall requires cargo
|
# cargo-watch/watchexec-cli is supported by cargo-binstall (through quickinstall)
|
||||||
if type -P cargo &>/dev/null; then
|
case "${version}" in
|
||||||
# cargo-watch/watchexec-cli is supported by cargo-binstall (through quickinstall)
|
latest) tools+=(cargo-watch watchexec-cli nextest) ;;
|
||||||
case "${version}" in
|
major.minor.patch) tools+=(cargo-watch@8.1.1 watchexec-cli@1.20.5 nextest@0.9.57) ;;
|
||||||
latest) tools+=(cargo-watch watchexec-cli nextest) ;;
|
major.minor) tools+=(cargo-watch@8.1 watchexec-cli@1.20 nextest@0.9) ;;
|
||||||
major.minor.patch) tools+=(cargo-watch@8.1.1 watchexec-cli@1.20.5 nextest@0.9.57) ;;
|
major) tools+=(cargo-watch@8 watchexec-cli@1) ;;
|
||||||
major.minor) tools+=(cargo-watch@8.1 watchexec-cli@1.20 nextest@0.9) ;;
|
*) exit 1 ;;
|
||||||
major) tools+=(cargo-watch@8 watchexec-cli@1) ;;
|
esac
|
||||||
*) exit 1 ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# sort and dedup
|
# sort and dedup
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "install-action-internal-codegen"
|
name = "install-action-internal-codegen"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
default-run = "generate-manifest"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
@@ -12,6 +13,7 @@ serde = "1"
|
|||||||
serde_derive = "1"
|
serde_derive = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
sha2 = "0.10"
|
sha2 = "0.10"
|
||||||
|
spdx = "0.10"
|
||||||
tar = "0.4"
|
tar = "0.4"
|
||||||
toml_edit = { version = "0.22", default-features = false, features = ["parse", "serde"] }
|
toml_edit = { version = "0.22", default-features = false, features = ["parse", "serde"] }
|
||||||
# TODO: call curl command instead of using ureq?
|
# TODO: call curl command instead of using ureq?
|
||||||
@@ -19,3 +21,15 @@ ureq = { version = "2", features = ["json"] }
|
|||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
bench = false
|
||||||
|
name = "generate-manifest"
|
||||||
|
path = "src/main.rs"
|
||||||
|
test = false
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
bench = false
|
||||||
|
name = "generate-tools-markdown"
|
||||||
|
path = "src/tools-markdown.rs"
|
||||||
|
test = false
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/biomejs/biome",
|
"repository": "https://github.com/biomejs/biome",
|
||||||
|
"website": "https://biomejs.dev",
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/biomejs/biome/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/biomejs/biome/blob/main/LICENSE-MIT)",
|
||||||
"tag_prefix": "cli/v",
|
"tag_prefix": "cli/v",
|
||||||
"bin": "${package}${exe}",
|
"bin": "${package}${exe}",
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/rustsec/rustsec",
|
"repository": "https://github.com/rustsec/rustsec",
|
||||||
|
"website": "https://github.com/rustsec/rustsec/tree/HEAD/cargo-audit",
|
||||||
|
"license_markdown": "[Apache-2.0](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-APACHE) OR [MIT](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-MIT)",
|
||||||
"tag_prefix": "cargo-audit/v",
|
"tag_prefix": "cargo-audit/v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-${rust_target}-v${version}.tgz",
|
"asset_name": "${package}-${rust_target}-v${version}.tgz",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/cargo-bins/cargo-binstall",
|
"repository": "https://github.com/cargo-bins/cargo-binstall",
|
||||||
|
"license_markdown": "[GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE)",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-${rust_target}.zip",
|
"asset_name": "${package}-${rust_target}.zip",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/DevinR528/cargo-sort",
|
"repository": "https://github.com/DevinR528/cargo-sort",
|
||||||
|
"license_markdown": "[Apache-2.0 OR MIT](https://github.com/DevinR528/cargo-sort/blob/55ec89082466f6bb246d870a8d56d166a8e1f08b/Cargo.toml#L5)",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-${rust_target}.tar.gz",
|
"asset_name": "${package}-${rust_target}.tar.gz",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/drahnr/cargo-spellcheck",
|
"repository": "https://github.com/drahnr/cargo-spellcheck",
|
||||||
|
"license_markdown": "[LGPLv2.1](https://github.com/drahnr/cargo-spellcheck/blob/master/LICENSE-LGPL)",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-v${version}-${rust_target}",
|
"asset_name": "${package}-v${version}-${rust_target}",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/est31/cargo-udeps",
|
"repository": "https://github.com/est31/cargo-udeps",
|
||||||
|
"license_markdown": "[Apache-2.0 OR MIT](https://github.com/est31/cargo-udeps/blob/HEAD/LICENSE)",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-v${version}-${rust_target}.tar.gz",
|
"asset_name": "${package}-v${version}-${rust_target}.tar.gz",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/mozilla/grcov",
|
"repository": "https://github.com/mozilla/grcov",
|
||||||
|
"license_markdown": "[MPL-2.0](https://github.com/mozilla/grcov/blob/HEAD/LICENSE-MPL-2.0)",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-${rust_target}.tar.bz2",
|
"asset_name": "${package}-${rust_target}.tar.bz2",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/protocolbuffers/protobuf",
|
"repository": "https://github.com/protocolbuffers/protobuf",
|
||||||
|
"license_markdown": "[BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/HEAD/LICENSE)",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"default_major_version": "3",
|
"default_major_version": "3",
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/koalaman/shellcheck",
|
"repository": "https://github.com/koalaman/shellcheck",
|
||||||
|
"website": "https://www.shellcheck.net",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"bin": "${package}-v${version}/${package}${exe}",
|
"bin": "${package}-v${version}/${package}${exe}",
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/rust-mobile/xbuild",
|
"repository": "https://github.com/rust-mobile/xbuild",
|
||||||
|
"license_markdown": "[Apache-2.0 OR MIT](https://github.com/rust-mobile/xbuild/blob/268939a99a50d7927bce3e343e5d2ed32eb8b30e/xbuild/Cargo.toml#L7)",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-${rust_target_os}-x64${exe}",
|
"asset_name": "${package}-${rust_target_os}-x64${exe}",
|
||||||
|
|||||||
379
tools/codegen/src/lib.rs
Normal file
379
tools/codegen/src/lib.rs
Normal file
@@ -0,0 +1,379 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||||
|
|
||||||
|
use std::{
|
||||||
|
cmp::{self, Reverse},
|
||||||
|
collections::BTreeMap,
|
||||||
|
env, fmt,
|
||||||
|
path::{Path, PathBuf},
|
||||||
|
slice,
|
||||||
|
str::FromStr,
|
||||||
|
};
|
||||||
|
|
||||||
|
use anyhow::Result;
|
||||||
|
use serde::{
|
||||||
|
de::{self, Deserialize, Deserializer},
|
||||||
|
ser::{Serialize, Serializer},
|
||||||
|
};
|
||||||
|
use serde_derive::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
|
pub fn workspace_root() -> PathBuf {
|
||||||
|
let mut dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
|
dir.pop(); // codegen
|
||||||
|
dir.pop(); // tools
|
||||||
|
dir
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub struct Version {
|
||||||
|
pub major: Option<u64>,
|
||||||
|
pub minor: Option<u64>,
|
||||||
|
pub patch: Option<u64>,
|
||||||
|
pub pre: semver::Prerelease,
|
||||||
|
pub build: semver::BuildMetadata,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Version {
|
||||||
|
#[must_use]
|
||||||
|
pub fn omitted(major: u64, minor: Option<u64>) -> Self {
|
||||||
|
Self {
|
||||||
|
major: Some(major),
|
||||||
|
minor,
|
||||||
|
patch: None,
|
||||||
|
pre: semver::Prerelease::default(),
|
||||||
|
build: semver::BuildMetadata::default(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[must_use]
|
||||||
|
pub fn latest() -> Self {
|
||||||
|
Self {
|
||||||
|
major: None,
|
||||||
|
minor: None,
|
||||||
|
patch: None,
|
||||||
|
pre: semver::Prerelease::default(),
|
||||||
|
build: semver::BuildMetadata::default(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[must_use]
|
||||||
|
pub fn to_semver(&self) -> Option<semver::Version> {
|
||||||
|
Some(semver::Version {
|
||||||
|
major: self.major?,
|
||||||
|
minor: self.minor?,
|
||||||
|
patch: self.patch?,
|
||||||
|
pre: self.pre.clone(),
|
||||||
|
build: self.build.clone(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl From<semver::Version> for Version {
|
||||||
|
fn from(v: semver::Version) -> Self {
|
||||||
|
Self {
|
||||||
|
major: Some(v.major),
|
||||||
|
minor: Some(v.minor),
|
||||||
|
patch: Some(v.patch),
|
||||||
|
pre: v.pre,
|
||||||
|
build: v.build,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl PartialOrd for Version {
|
||||||
|
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
|
||||||
|
Some(self.cmp(other))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl Ord for Version {
|
||||||
|
fn cmp(&self, other: &Self) -> cmp::Ordering {
|
||||||
|
pub(crate) fn convert(v: &Version) -> semver::Version {
|
||||||
|
semver::Version {
|
||||||
|
major: v.major.unwrap_or(u64::MAX),
|
||||||
|
minor: v.minor.unwrap_or(u64::MAX),
|
||||||
|
patch: v.patch.unwrap_or(u64::MAX),
|
||||||
|
pre: v.pre.clone(),
|
||||||
|
build: v.build.clone(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
convert(self).cmp(&convert(other))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl fmt::Display for Version {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
let Some(major) = self.major else {
|
||||||
|
f.write_str("latest")?;
|
||||||
|
return Ok(());
|
||||||
|
};
|
||||||
|
f.write_str(&major.to_string())?;
|
||||||
|
let Some(minor) = self.minor else {
|
||||||
|
return Ok(());
|
||||||
|
};
|
||||||
|
f.write_str(".")?;
|
||||||
|
f.write_str(&minor.to_string())?;
|
||||||
|
let Some(patch) = self.patch else {
|
||||||
|
return Ok(());
|
||||||
|
};
|
||||||
|
f.write_str(".")?;
|
||||||
|
f.write_str(&patch.to_string())?;
|
||||||
|
if !self.pre.is_empty() {
|
||||||
|
f.write_str("-")?;
|
||||||
|
f.write_str(&self.pre)?;
|
||||||
|
}
|
||||||
|
if !self.build.is_empty() {
|
||||||
|
f.write_str("+")?;
|
||||||
|
f.write_str(&self.build)?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl FromStr for Version {
|
||||||
|
type Err = semver::Error;
|
||||||
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
|
if s == "latest" {
|
||||||
|
return Ok(Self::latest());
|
||||||
|
}
|
||||||
|
match s.parse::<semver::Version>() {
|
||||||
|
Ok(v) => Ok(v.into()),
|
||||||
|
Err(e) => match s.parse::<semver::Comparator>() {
|
||||||
|
Ok(v) => Ok(Self {
|
||||||
|
major: Some(v.major),
|
||||||
|
minor: v.minor,
|
||||||
|
patch: v.patch,
|
||||||
|
pre: semver::Prerelease::default(),
|
||||||
|
build: semver::BuildMetadata::default(),
|
||||||
|
}),
|
||||||
|
Err(_e) => Err(e),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl Serialize for Version {
|
||||||
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: Serializer,
|
||||||
|
{
|
||||||
|
String::serialize(&self.to_string(), serializer)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> Deserialize<'de> for Version {
|
||||||
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: Deserializer<'de>,
|
||||||
|
{
|
||||||
|
String::deserialize(deserializer)?.parse().map_err(de::Error::custom)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||||
|
pub struct Manifests {
|
||||||
|
pub rust_crate: Option<String>,
|
||||||
|
pub template: Option<ManifestTemplate>,
|
||||||
|
/// Markdown for the licenses.
|
||||||
|
pub license_markdown: String,
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub map: BTreeMap<Reverse<Version>, ManifestRef>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum ManifestRef {
|
||||||
|
Ref { version: Version },
|
||||||
|
Real(Manifest),
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
pub struct Manifest {
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub download_info: BTreeMap<HostPlatform, ManifestDownloadInfo>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
pub struct ManifestDownloadInfo {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub url: Option<String>,
|
||||||
|
pub checksum: String,
|
||||||
|
/// Path to binaries in archive. Default to `${tool}${exe}`.
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub bin: Option<StringOrArray>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
pub struct ManifestTemplate {
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub download_info: BTreeMap<HostPlatform, ManifestTemplateDownloadInfo>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
pub struct ManifestTemplateDownloadInfo {
|
||||||
|
pub url: String,
|
||||||
|
/// Path to binaries in archive. Default to `${tool}${exe}`.
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub bin: Option<StringOrArray>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub struct BaseManifest {
|
||||||
|
/// Link to the GitHub repository.
|
||||||
|
pub repository: String,
|
||||||
|
/// Alternative link for the project. Automatically detected if possible.
|
||||||
|
pub website: Option<String>,
|
||||||
|
/// Markdown syntax for links to licenses. Automatically detected if possible.
|
||||||
|
pub license_markdown: Option<String>,
|
||||||
|
/// Prefix of release tag.
|
||||||
|
pub tag_prefix: String,
|
||||||
|
/// Crate name, if this is Rust crate.
|
||||||
|
pub rust_crate: Option<String>,
|
||||||
|
pub default_major_version: Option<String>,
|
||||||
|
/// Asset name patterns.
|
||||||
|
pub asset_name: Option<StringOrArray>,
|
||||||
|
/// Path to binaries in archive. Default to `${tool}${exe}`.
|
||||||
|
pub bin: Option<StringOrArray>,
|
||||||
|
pub signing: Option<Signing>,
|
||||||
|
#[serde(default)]
|
||||||
|
pub broken: Vec<semver::Version>,
|
||||||
|
pub platform: BTreeMap<HostPlatform, BaseManifestPlatformInfo>,
|
||||||
|
pub version_range: Option<String>,
|
||||||
|
}
|
||||||
|
impl BaseManifest {
|
||||||
|
/// Validate the manifest.
|
||||||
|
// The panic is an assert
|
||||||
|
#[allow(clippy::missing_panics_doc)]
|
||||||
|
pub fn validate(&self) {
|
||||||
|
for bin in self.bin.iter().chain(self.platform.values().flat_map(|m| &m.bin)) {
|
||||||
|
assert!(!bin.as_slice().is_empty());
|
||||||
|
for bin in bin.as_slice() {
|
||||||
|
let file_name = Path::new(bin).file_name().unwrap().to_str().unwrap();
|
||||||
|
if !self.repository.ends_with("/xbuild") {
|
||||||
|
assert!(
|
||||||
|
!(file_name.contains("${version") || file_name.contains("${rust")),
|
||||||
|
"{bin}"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub struct Signing {
|
||||||
|
pub kind: SigningKind,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, PartialEq, Eq)]
|
||||||
|
#[serde(rename_all = "kebab-case")]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub enum SigningKind {
|
||||||
|
/// algorithm: minisign
|
||||||
|
/// public key: package.metadata.binstall.signing.pubkey at Cargo.toml
|
||||||
|
/// <https://github.com/cargo-bins/cargo-binstall/blob/HEAD/SIGNING.md>
|
||||||
|
MinisignBinstall,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub struct BaseManifestPlatformInfo {
|
||||||
|
/// Asset name patterns. Default to the value at `BaseManifest::asset_name`.
|
||||||
|
pub asset_name: Option<StringOrArray>,
|
||||||
|
/// Path to binaries in archive. Default to the value at `BaseManifest::bin`.
|
||||||
|
pub bin: Option<StringOrArray>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum StringOrArray {
|
||||||
|
String(String),
|
||||||
|
Array(Vec<String>),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl StringOrArray {
|
||||||
|
#[must_use]
|
||||||
|
pub fn as_slice(&self) -> &[String] {
|
||||||
|
match self {
|
||||||
|
Self::String(s) => slice::from_ref(s),
|
||||||
|
Self::Array(v) => v,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[must_use]
|
||||||
|
pub fn map(&self, mut f: impl FnMut(&String) -> String) -> Self {
|
||||||
|
match self {
|
||||||
|
Self::String(s) => Self::String(f(s)),
|
||||||
|
Self::Array(v) => Self::Array(v.iter().map(f).collect()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64),
|
||||||
|
/// and macOS (x86_64, aarch64).
|
||||||
|
/// https://github.com/actions/runner/blob/v2.315.0/.github/workflows/build.yml#L21
|
||||||
|
/// https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
|
||||||
|
///
|
||||||
|
/// Note:
|
||||||
|
/// - Static-linked binaries compiled for linux-musl will also work on linux-gnu systems and are
|
||||||
|
/// 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.)
|
||||||
|
/// - 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+.
|
||||||
|
/// - Ignore arm for now, as we need to consider the version and whether hard-float is supported.
|
||||||
|
/// https://github.com/rust-lang/rustup/pull/593
|
||||||
|
/// https://github.com/cross-rs/cross/pull/1018
|
||||||
|
/// Does it seem only armv7l+ is supported?
|
||||||
|
/// https://github.com/actions/runner/blob/v2.315.0/src/Misc/externals.sh#L189
|
||||||
|
/// https://github.com/actions/runner/issues/688
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
|
||||||
|
pub enum HostPlatform {
|
||||||
|
x86_64_linux_gnu,
|
||||||
|
x86_64_linux_musl,
|
||||||
|
x86_64_macos,
|
||||||
|
x86_64_windows,
|
||||||
|
aarch64_linux_gnu,
|
||||||
|
aarch64_linux_musl,
|
||||||
|
aarch64_macos,
|
||||||
|
aarch64_windows,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HostPlatform {
|
||||||
|
#[must_use]
|
||||||
|
pub fn rust_target(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::x86_64_linux_gnu => "x86_64-unknown-linux-gnu",
|
||||||
|
Self::x86_64_linux_musl => "x86_64-unknown-linux-musl",
|
||||||
|
Self::x86_64_macos => "x86_64-apple-darwin",
|
||||||
|
Self::x86_64_windows => "x86_64-pc-windows-msvc",
|
||||||
|
Self::aarch64_linux_gnu => "aarch64-unknown-linux-gnu",
|
||||||
|
Self::aarch64_linux_musl => "aarch64-unknown-linux-musl",
|
||||||
|
Self::aarch64_macos => "aarch64-apple-darwin",
|
||||||
|
Self::aarch64_windows => "aarch64-pc-windows-msvc",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[must_use]
|
||||||
|
pub fn rust_target_arch(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::aarch64_linux_gnu
|
||||||
|
| Self::aarch64_linux_musl
|
||||||
|
| Self::aarch64_macos
|
||||||
|
| Self::aarch64_windows => "aarch64",
|
||||||
|
Self::x86_64_linux_gnu
|
||||||
|
| Self::x86_64_linux_musl
|
||||||
|
| Self::x86_64_macos
|
||||||
|
| Self::x86_64_windows => "x86_64",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[must_use]
|
||||||
|
pub fn rust_target_os(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::aarch64_linux_gnu
|
||||||
|
| Self::aarch64_linux_musl
|
||||||
|
| Self::x86_64_linux_gnu
|
||||||
|
| Self::x86_64_linux_musl => "linux",
|
||||||
|
Self::aarch64_macos | Self::x86_64_macos => "macos",
|
||||||
|
Self::aarch64_windows | Self::x86_64_windows => "windows",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[must_use]
|
||||||
|
pub fn exe_suffix(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::x86_64_windows | Self::aarch64_windows => ".exe",
|
||||||
|
_ => "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,26 +1,23 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
cmp::{self, Reverse},
|
cmp::Reverse,
|
||||||
collections::{BTreeMap, BTreeSet},
|
collections::{BTreeMap, BTreeSet},
|
||||||
env,
|
env,
|
||||||
ffi::OsStr,
|
ffi::OsStr,
|
||||||
fmt,
|
|
||||||
io::Read,
|
io::Read,
|
||||||
path::{Path, PathBuf},
|
path::Path,
|
||||||
slice,
|
|
||||||
str::FromStr,
|
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{bail, Context as _, Result};
|
use anyhow::{bail, Context as _, Result};
|
||||||
use fs_err as fs;
|
use fs_err as fs;
|
||||||
use serde::{
|
use install_action_internal_codegen::{
|
||||||
de::{self, Deserialize, Deserializer},
|
workspace_root, BaseManifest, HostPlatform, Manifest, ManifestDownloadInfo, ManifestRef,
|
||||||
ser::{Serialize, Serializer},
|
ManifestTemplate, ManifestTemplateDownloadInfo, Manifests, Signing, SigningKind, Version,
|
||||||
};
|
};
|
||||||
use serde_derive::{Deserialize, Serialize};
|
|
||||||
use sha2::{Digest, Sha256};
|
use sha2::{Digest, Sha256};
|
||||||
|
use spdx::expression::{ExprNode, ExpressionReq, Operator};
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let args: Vec<_> = env::args().skip(1).collect();
|
let args: Vec<_> = env::args().skip(1).collect();
|
||||||
@@ -46,7 +43,12 @@ fn main() -> Result<()> {
|
|||||||
let repo = base_info
|
let repo = base_info
|
||||||
.repository
|
.repository
|
||||||
.strip_prefix("https://github.com/")
|
.strip_prefix("https://github.com/")
|
||||||
.context("repository must be starts with https://github.com/")?;
|
.context("repository must start with https://github.com/")?;
|
||||||
|
|
||||||
|
eprintln!("downloading metadata from https://github.com/{repo}");
|
||||||
|
|
||||||
|
let repo_info: github::RepoMetadata =
|
||||||
|
download_github(&format!("https://api.github.com/repos/{repo}"))?.into_json()?;
|
||||||
|
|
||||||
eprintln!("downloading releases of https://github.com/{repo} from https://api.github.com/repos/{repo}/releases");
|
eprintln!("downloading releases of https://github.com/{repo} from https://api.github.com/repos/{repo}/releases");
|
||||||
let mut releases: github::Releases = vec![];
|
let mut releases: github::Releases = vec![];
|
||||||
@@ -82,6 +84,7 @@ fn main() -> Result<()> {
|
|||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let mut crates_io_info = None;
|
let mut crates_io_info = None;
|
||||||
|
let mut crates_io_version_detail = None;
|
||||||
base_info.rust_crate = base_info
|
base_info.rust_crate = base_info
|
||||||
.rust_crate
|
.rust_crate
|
||||||
.as_ref()
|
.as_ref()
|
||||||
@@ -89,10 +92,29 @@ fn main() -> Result<()> {
|
|||||||
.transpose()?;
|
.transpose()?;
|
||||||
if let Some(crate_name) = &base_info.rust_crate {
|
if let Some(crate_name) = &base_info.rust_crate {
|
||||||
eprintln!("downloading crate info from https://crates.io/api/v1/crates/{crate_name}");
|
eprintln!("downloading crate info from https://crates.io/api/v1/crates/{crate_name}");
|
||||||
crates_io_info = Some(
|
let info = download(&format!("https://crates.io/api/v1/crates/{crate_name}"))?
|
||||||
download(&format!("https://crates.io/api/v1/crates/{crate_name}"))?
|
.into_json::<crates_io::Crate>()?;
|
||||||
.into_json::<crates_io::Crate>()?,
|
let latest_version = &info.versions[0].num;
|
||||||
|
crates_io_version_detail = Some(
|
||||||
|
download(&format!("https://crates.io/api/v1/crates/{crate_name}/{latest_version}"))?
|
||||||
|
.into_json::<crates_io::VersionMetadata>()?
|
||||||
|
.version,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if let Some(crate_repository) = info.crate_.repository.clone() {
|
||||||
|
// cargo-dinghy is fixed at https://github.com/sonos/dinghy/pull/231, but not yet released
|
||||||
|
if crate_name != "cargo-dinghy"
|
||||||
|
&& !crate_repository
|
||||||
|
.to_lowercase()
|
||||||
|
.starts_with(&base_info.repository.to_lowercase())
|
||||||
|
{
|
||||||
|
panic!("repository {crate_repository} from crates.io differs from base manifest");
|
||||||
|
}
|
||||||
|
} else if crate_name != "zola" {
|
||||||
|
panic!("crate metadata does not include a repository");
|
||||||
|
}
|
||||||
|
|
||||||
|
crates_io_info = Some(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut manifests: Manifests = Manifests::default();
|
let mut manifests: Manifests = Manifests::default();
|
||||||
@@ -130,6 +152,44 @@ fn main() -> Result<()> {
|
|||||||
Err(e) => eprintln!("failed to load old manifest: {e}"),
|
Err(e) => eprintln!("failed to load old manifest: {e}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check website
|
||||||
|
if let Some(website) = base_info.website {
|
||||||
|
if website.is_empty() || website == base_info.repository {
|
||||||
|
panic!("Please do not put the repository in website, or set website to an empty value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Populate license_markdown
|
||||||
|
if let Some(license_markdown) = base_info.license_markdown {
|
||||||
|
if license_markdown.is_empty() {
|
||||||
|
panic!("license_markdown can not be an empty value");
|
||||||
|
}
|
||||||
|
manifests.license_markdown = license_markdown;
|
||||||
|
} else if let Some(detail) = crates_io_version_detail {
|
||||||
|
if let Some(license) = detail.license {
|
||||||
|
eprintln!("Trying to using license '{license}' from crates.io ...");
|
||||||
|
if let Some(license_markdown) =
|
||||||
|
get_license_markdown(&license, &repo.to_string(), &repo_info.default_branch)
|
||||||
|
{
|
||||||
|
manifests.license_markdown = license_markdown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if let Some(license) = repo_info.license {
|
||||||
|
if let Some(license) = license.spdx_id {
|
||||||
|
eprintln!("Trying to using license '{license}' from github.com ...");
|
||||||
|
if let Some(license_markdown) =
|
||||||
|
get_license_markdown(&license, &repo.to_string(), &repo_info.default_branch)
|
||||||
|
{
|
||||||
|
manifests.license_markdown = license_markdown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if manifests.license_markdown.is_empty() {
|
||||||
|
panic!("Unable to determine license_markdown; set manually")
|
||||||
|
}
|
||||||
|
|
||||||
let version_req: Option<semver::VersionReq> = match args.get(1) {
|
let version_req: Option<semver::VersionReq> = match args.get(1) {
|
||||||
_ if latest_only => {
|
_ if latest_only => {
|
||||||
let req = format!("={}", releases.first_key_value().unwrap().0 .0).parse()?;
|
let req = format!("={}", releases.first_key_value().unwrap().0 .0).parse()?;
|
||||||
@@ -488,13 +548,6 @@ fn main() -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn workspace_root() -> PathBuf {
|
|
||||||
let mut dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
|
||||||
dir.pop(); // codegen
|
|
||||||
dir.pop(); // tools
|
|
||||||
dir
|
|
||||||
}
|
|
||||||
|
|
||||||
fn replace_vars(
|
fn replace_vars(
|
||||||
s: &str,
|
s: &str,
|
||||||
package: &str,
|
package: &str,
|
||||||
@@ -561,6 +614,35 @@ fn download_github(url: &str) -> Result<ureq::Response> {
|
|||||||
Err(last_error.unwrap().into())
|
Err(last_error.unwrap().into())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::missing_panics_doc)]
|
||||||
|
pub fn github_head(url: &str) -> Result<()> {
|
||||||
|
eprintln!("fetching head of {url} ..");
|
||||||
|
let mut token = env::var("GITHUB_TOKEN").ok().filter(|v| !v.is_empty());
|
||||||
|
let mut retry = 0;
|
||||||
|
let max_retry = 2;
|
||||||
|
let mut last_error;
|
||||||
|
loop {
|
||||||
|
let mut req = ureq::head(url);
|
||||||
|
if let Some(token) = &token {
|
||||||
|
req = req.set("Authorization", token);
|
||||||
|
}
|
||||||
|
match req.call() {
|
||||||
|
Ok(_) => return Ok(()),
|
||||||
|
Err(e) => last_error = Some(e),
|
||||||
|
}
|
||||||
|
if retry == max_retry / 2 && token.is_some() {
|
||||||
|
token = None;
|
||||||
|
}
|
||||||
|
retry += 1;
|
||||||
|
if retry > max_retry {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
eprintln!("head of {url} failed; retrying after {}s ({retry}/{max_retry})", retry * 2);
|
||||||
|
std::thread::sleep(Duration::from_secs(retry * 2));
|
||||||
|
}
|
||||||
|
Err(last_error.unwrap().into())
|
||||||
|
}
|
||||||
|
|
||||||
/// Download without using GITHUB_TOKEN.
|
/// Download without using GITHUB_TOKEN.
|
||||||
#[allow(clippy::missing_panics_doc)]
|
#[allow(clippy::missing_panics_doc)]
|
||||||
pub fn download(url: &str) -> Result<ureq::Response> {
|
pub fn download(url: &str) -> Result<ureq::Response> {
|
||||||
@@ -583,345 +665,129 @@ pub fn download(url: &str) -> Result<ureq::Response> {
|
|||||||
Err(last_error.unwrap().into())
|
Err(last_error.unwrap().into())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[must_use]
|
||||||
struct Version {
|
fn create_github_raw_link(repository: &String, branch: &String, filename: &String) -> String {
|
||||||
major: Option<u64>,
|
format!("https://raw.githubusercontent.com/{repository}/{branch}/{filename}")
|
||||||
minor: Option<u64>,
|
|
||||||
patch: Option<u64>,
|
|
||||||
pre: semver::Prerelease,
|
|
||||||
build: semver::BuildMetadata,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Version {
|
#[must_use]
|
||||||
fn omitted(major: u64, minor: Option<u64>) -> Self {
|
fn create_github_link(repository: &String, branch: &String, filename: &String) -> String {
|
||||||
Self {
|
format!("https://github.com/{repository}/blob/{branch}/{filename}")
|
||||||
major: Some(major),
|
}
|
||||||
minor,
|
#[must_use]
|
||||||
patch: None,
|
fn get_license_markdown(spdx_expr: &str, repo: &String, default_branch: &String) -> Option<String> {
|
||||||
pre: semver::Prerelease::default(),
|
// TODO: use https://docs.rs/spdx/latest/spdx/expression/struct.Expression.html#method.canonicalize ?
|
||||||
build: semver::BuildMetadata::default(),
|
let expr = spdx::Expression::parse_mode(spdx_expr, spdx::ParseMode::LAX).unwrap();
|
||||||
|
|
||||||
|
let mut op = None;
|
||||||
|
let mut license_ids: Vec<(&spdx::LicenseId, Option<&spdx::ExceptionId>)> = vec![];
|
||||||
|
|
||||||
|
for node in expr.iter() {
|
||||||
|
match node {
|
||||||
|
ExprNode::Req(ExpressionReq {
|
||||||
|
req:
|
||||||
|
spdx::LicenseReq {
|
||||||
|
license: spdx::LicenseItem::Spdx { id, or_later },
|
||||||
|
exception,
|
||||||
|
..
|
||||||
|
},
|
||||||
|
..
|
||||||
|
}) => {
|
||||||
|
if *or_later {
|
||||||
|
panic!("need to handle or_later");
|
||||||
|
}
|
||||||
|
if let Some(exception_id) = exception {
|
||||||
|
license_ids.push((id, Some(exception_id)));
|
||||||
|
} else {
|
||||||
|
license_ids.push((id, None));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ExprNode::Op(current_op) => {
|
||||||
|
if op.is_some() && op != Some(current_op) {
|
||||||
|
panic!("SPDX too complex");
|
||||||
|
}
|
||||||
|
op = Some(current_op);
|
||||||
|
}
|
||||||
|
ExprNode::Req(_) => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn latest() -> Self {
|
|
||||||
Self {
|
match license_ids.len() {
|
||||||
major: None,
|
0 => panic!("No licenses"),
|
||||||
minor: None,
|
1 => {
|
||||||
patch: None,
|
let (license_id, exception_id) = license_ids.first().unwrap();
|
||||||
pre: semver::Prerelease::default(),
|
let license_name = if let Some(exception_id) = exception_id {
|
||||||
build: semver::BuildMetadata::default(),
|
format!("{} WITH {}", license_id.name, exception_id.name)
|
||||||
}
|
} else {
|
||||||
}
|
license_id.name.to_string()
|
||||||
fn to_semver(&self) -> Option<semver::Version> {
|
};
|
||||||
Some(semver::Version {
|
let name = license_id.name.split('-').next().unwrap().to_ascii_uppercase();
|
||||||
major: self.major?,
|
for filename in
|
||||||
minor: self.minor?,
|
["LICENSE".to_string(), format!("LICENSE-{name}"), "LICENSE.md".to_string()]
|
||||||
patch: self.patch?,
|
{
|
||||||
pre: self.pre.clone(),
|
let url = create_github_raw_link(repo, default_branch, &filename);
|
||||||
build: self.build.clone(),
|
if github_head(&url).is_ok() {
|
||||||
})
|
let url = create_github_link(repo, default_branch, &filename);
|
||||||
}
|
return Some(format!("[{license_name}]({url})"));
|
||||||
}
|
}
|
||||||
impl From<semver::Version> for Version {
|
|
||||||
fn from(v: semver::Version) -> Self {
|
|
||||||
Self {
|
|
||||||
major: Some(v.major),
|
|
||||||
minor: Some(v.minor),
|
|
||||||
patch: Some(v.patch),
|
|
||||||
pre: v.pre,
|
|
||||||
build: v.build,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl PartialOrd for Version {
|
|
||||||
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
|
|
||||||
Some(self.cmp(other))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl Ord for Version {
|
|
||||||
fn cmp(&self, other: &Self) -> cmp::Ordering {
|
|
||||||
fn convert(v: &Version) -> semver::Version {
|
|
||||||
semver::Version {
|
|
||||||
major: v.major.unwrap_or(u64::MAX),
|
|
||||||
minor: v.minor.unwrap_or(u64::MAX),
|
|
||||||
patch: v.patch.unwrap_or(u64::MAX),
|
|
||||||
pre: v.pre.clone(),
|
|
||||||
build: v.build.clone(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
convert(self).cmp(&convert(other))
|
len => {
|
||||||
}
|
let mut license_markdowns: Vec<String> = vec![];
|
||||||
}
|
for (license_id, exception_id) in &license_ids {
|
||||||
impl fmt::Display for Version {
|
let name = license_id.name.split('-').next().unwrap().to_ascii_uppercase();
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
let filename = format!("LICENSE-{name}");
|
||||||
let Some(major) = self.major else {
|
let url = create_github_raw_link(repo, default_branch, &filename);
|
||||||
f.write_str("latest")?;
|
let license_name = if let Some(exception_id) = exception_id {
|
||||||
return Ok(());
|
format!("{} WITH {}", license_id.name, exception_id.name)
|
||||||
};
|
} else {
|
||||||
f.write_str(&major.to_string())?;
|
license_id.name.to_string()
|
||||||
let Some(minor) = self.minor else {
|
};
|
||||||
return Ok(());
|
if github_head(&url).is_ok() {
|
||||||
};
|
let url = create_github_link(repo, default_branch, &filename);
|
||||||
f.write_str(".")?;
|
license_markdowns.push(format!("[{license_name}]({url})"));
|
||||||
f.write_str(&minor.to_string())?;
|
}
|
||||||
let Some(patch) = self.patch else {
|
}
|
||||||
return Ok(());
|
if license_markdowns.is_empty() {
|
||||||
};
|
panic!("Unable to find any license files in the repo for licenses {license_ids:?}");
|
||||||
f.write_str(".")?;
|
}
|
||||||
f.write_str(&patch.to_string())?;
|
if license_markdowns.len() != len {
|
||||||
if !self.pre.is_empty() {
|
panic!("Unable to find license files in the repo for all licenses {license_ids:?}; found {license_markdowns:?}");
|
||||||
f.write_str("-")?;
|
}
|
||||||
f.write_str(&self.pre)?;
|
match op {
|
||||||
}
|
None => panic!("op expected"),
|
||||||
if !self.build.is_empty() {
|
Some(Operator::Or) => {
|
||||||
f.write_str("+")?;
|
return Some(license_markdowns.join(" OR "));
|
||||||
f.write_str(&self.build)?;
|
}
|
||||||
}
|
Some(Operator::And) => {
|
||||||
Ok(())
|
return Some(license_markdowns.join(" AND "));
|
||||||
}
|
|
||||||
}
|
|
||||||
impl FromStr for Version {
|
|
||||||
type Err = semver::Error;
|
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
|
||||||
if s == "latest" {
|
|
||||||
return Ok(Self::latest());
|
|
||||||
}
|
|
||||||
match s.parse::<semver::Version>() {
|
|
||||||
Ok(v) => Ok(v.into()),
|
|
||||||
Err(e) => match s.parse::<semver::Comparator>() {
|
|
||||||
Ok(v) => Ok(Self {
|
|
||||||
major: Some(v.major),
|
|
||||||
minor: v.minor,
|
|
||||||
patch: v.patch,
|
|
||||||
pre: semver::Prerelease::default(),
|
|
||||||
build: semver::BuildMetadata::default(),
|
|
||||||
}),
|
|
||||||
Err(_e) => Err(e),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl Serialize for Version {
|
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
|
||||||
where
|
|
||||||
S: Serializer,
|
|
||||||
{
|
|
||||||
String::serialize(&self.to_string(), serializer)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl<'de> Deserialize<'de> for Version {
|
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
|
||||||
where
|
|
||||||
D: Deserializer<'de>,
|
|
||||||
{
|
|
||||||
String::deserialize(deserializer)?.parse().map_err(de::Error::custom)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
|
||||||
struct Manifests {
|
|
||||||
rust_crate: Option<String>,
|
|
||||||
template: Option<ManifestTemplate>,
|
|
||||||
#[serde(flatten)]
|
|
||||||
map: BTreeMap<Reverse<Version>, ManifestRef>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
enum ManifestRef {
|
|
||||||
Ref { version: Version },
|
|
||||||
Real(Manifest),
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
struct Manifest {
|
|
||||||
#[serde(flatten)]
|
|
||||||
download_info: BTreeMap<HostPlatform, ManifestDownloadInfo>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
struct ManifestDownloadInfo {
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
url: Option<String>,
|
|
||||||
checksum: String,
|
|
||||||
/// Path to binaries in archive. Default to `${tool}${exe}`.
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
bin: Option<StringOrArray>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
struct ManifestTemplate {
|
|
||||||
#[serde(flatten)]
|
|
||||||
download_info: BTreeMap<HostPlatform, ManifestTemplateDownloadInfo>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
struct ManifestTemplateDownloadInfo {
|
|
||||||
url: String,
|
|
||||||
/// Path to binaries in archive. Default to `${tool}${exe}`.
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
bin: Option<StringOrArray>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
|
||||||
#[serde(deny_unknown_fields)]
|
|
||||||
struct BaseManifest {
|
|
||||||
/// Link to the GitHub repository.
|
|
||||||
repository: String,
|
|
||||||
/// Prefix of release tag.
|
|
||||||
tag_prefix: String,
|
|
||||||
/// Crate name, if this is Rust crate.
|
|
||||||
rust_crate: Option<String>,
|
|
||||||
default_major_version: Option<String>,
|
|
||||||
/// Asset name patterns.
|
|
||||||
asset_name: Option<StringOrArray>,
|
|
||||||
/// Path to binaries in archive. Default to `${tool}${exe}`.
|
|
||||||
bin: Option<StringOrArray>,
|
|
||||||
signing: Option<Signing>,
|
|
||||||
#[serde(default)]
|
|
||||||
broken: Vec<semver::Version>,
|
|
||||||
platform: BTreeMap<HostPlatform, BaseManifestPlatformInfo>,
|
|
||||||
version_range: Option<String>,
|
|
||||||
}
|
|
||||||
impl BaseManifest {
|
|
||||||
fn validate(&self) {
|
|
||||||
for bin in self.bin.iter().chain(self.platform.values().flat_map(|m| &m.bin)) {
|
|
||||||
assert!(!bin.as_slice().is_empty());
|
|
||||||
for bin in bin.as_slice() {
|
|
||||||
let file_name = Path::new(bin).file_name().unwrap().to_str().unwrap();
|
|
||||||
if !self.repository.ends_with("/xbuild") {
|
|
||||||
assert!(
|
|
||||||
!(file_name.contains("${version") || file_name.contains("${rust")),
|
|
||||||
"{bin}"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
None
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
|
||||||
#[serde(deny_unknown_fields)]
|
|
||||||
struct Signing {
|
|
||||||
kind: SigningKind,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, PartialEq, Eq)]
|
|
||||||
#[serde(rename_all = "kebab-case")]
|
|
||||||
#[serde(deny_unknown_fields)]
|
|
||||||
enum SigningKind {
|
|
||||||
/// algorithm: minisign
|
|
||||||
/// public key: package.metadata.binstall.signing.pubkey at Cargo.toml
|
|
||||||
/// <https://github.com/cargo-bins/cargo-binstall/blob/HEAD/SIGNING.md>
|
|
||||||
MinisignBinstall,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
|
||||||
#[serde(deny_unknown_fields)]
|
|
||||||
struct BaseManifestPlatformInfo {
|
|
||||||
/// Asset name patterns. Default to the value at `BaseManifest::asset_name`.
|
|
||||||
asset_name: Option<StringOrArray>,
|
|
||||||
/// Path to binaries in archive. Default to the value at `BaseManifest::bin`.
|
|
||||||
bin: Option<StringOrArray>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
enum StringOrArray {
|
|
||||||
String(String),
|
|
||||||
Array(Vec<String>),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl StringOrArray {
|
|
||||||
fn as_slice(&self) -> &[String] {
|
|
||||||
match self {
|
|
||||||
Self::String(s) => slice::from_ref(s),
|
|
||||||
Self::Array(v) => v,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fn map(&self, mut f: impl FnMut(&String) -> String) -> Self {
|
|
||||||
match self {
|
|
||||||
Self::String(s) => Self::String(f(s)),
|
|
||||||
Self::Array(v) => Self::Array(v.iter().map(f).collect()),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// GitHub Actions Runner supports Linux (x86_64, aarch64, arm), Windows (x86_64, aarch64),
|
|
||||||
/// and macOS (x86_64, aarch64).
|
|
||||||
/// https://github.com/actions/runner/blob/v2.315.0/.github/workflows/build.yml#L21
|
|
||||||
/// https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
|
|
||||||
///
|
|
||||||
/// Note:
|
|
||||||
/// - Static-linked binaries compiled for linux-musl will also work on linux-gnu systems and are
|
|
||||||
/// 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.)
|
|
||||||
/// - 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+.
|
|
||||||
/// - Ignore arm for now, as we need to consider the version and whether hard-float is supported.
|
|
||||||
/// https://github.com/rust-lang/rustup/pull/593
|
|
||||||
/// https://github.com/cross-rs/cross/pull/1018
|
|
||||||
/// Does it seem only armv7l+ is supported?
|
|
||||||
/// https://github.com/actions/runner/blob/v2.315.0/src/Misc/externals.sh#L189
|
|
||||||
/// https://github.com/actions/runner/issues/688
|
|
||||||
#[allow(non_camel_case_types)]
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
|
|
||||||
enum HostPlatform {
|
|
||||||
x86_64_linux_gnu,
|
|
||||||
x86_64_linux_musl,
|
|
||||||
x86_64_macos,
|
|
||||||
x86_64_windows,
|
|
||||||
aarch64_linux_gnu,
|
|
||||||
aarch64_linux_musl,
|
|
||||||
aarch64_macos,
|
|
||||||
aarch64_windows,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl HostPlatform {
|
|
||||||
fn rust_target(self) -> &'static str {
|
|
||||||
match self {
|
|
||||||
Self::x86_64_linux_gnu => "x86_64-unknown-linux-gnu",
|
|
||||||
Self::x86_64_linux_musl => "x86_64-unknown-linux-musl",
|
|
||||||
Self::x86_64_macos => "x86_64-apple-darwin",
|
|
||||||
Self::x86_64_windows => "x86_64-pc-windows-msvc",
|
|
||||||
Self::aarch64_linux_gnu => "aarch64-unknown-linux-gnu",
|
|
||||||
Self::aarch64_linux_musl => "aarch64-unknown-linux-musl",
|
|
||||||
Self::aarch64_macos => "aarch64-apple-darwin",
|
|
||||||
Self::aarch64_windows => "aarch64-pc-windows-msvc",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fn rust_target_arch(self) -> &'static str {
|
|
||||||
match self {
|
|
||||||
Self::aarch64_linux_gnu
|
|
||||||
| Self::aarch64_linux_musl
|
|
||||||
| Self::aarch64_macos
|
|
||||||
| Self::aarch64_windows => "aarch64",
|
|
||||||
Self::x86_64_linux_gnu
|
|
||||||
| Self::x86_64_linux_musl
|
|
||||||
| Self::x86_64_macos
|
|
||||||
| Self::x86_64_windows => "x86_64",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fn rust_target_os(self) -> &'static str {
|
|
||||||
match self {
|
|
||||||
Self::aarch64_linux_gnu
|
|
||||||
| Self::aarch64_linux_musl
|
|
||||||
| Self::x86_64_linux_gnu
|
|
||||||
| Self::x86_64_linux_musl => "linux",
|
|
||||||
Self::aarch64_macos | Self::x86_64_macos => "macos",
|
|
||||||
Self::aarch64_windows | Self::x86_64_windows => "windows",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fn exe_suffix(self) -> &'static str {
|
|
||||||
match self {
|
|
||||||
Self::x86_64_windows | Self::aarch64_windows => ".exe",
|
|
||||||
_ => "",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mod github {
|
mod github {
|
||||||
use serde_derive::Deserialize;
|
use serde_derive::Deserialize;
|
||||||
|
|
||||||
|
// https://api.github.com/repos/<repo>
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
pub(crate) struct RepoMetadata {
|
||||||
|
#[serde(default)]
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub(crate) homepage: Option<String>,
|
||||||
|
#[serde(default)]
|
||||||
|
pub(crate) license: Option<RepoLicense>,
|
||||||
|
pub(crate) default_branch: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
pub(crate) struct RepoLicense {
|
||||||
|
#[serde(default)]
|
||||||
|
pub(crate) spdx_id: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
// https://api.github.com/repos/<repo>/releases
|
// https://api.github.com/repos/<repo>/releases
|
||||||
pub(crate) type Releases = Vec<Release>;
|
pub(crate) type Releases = Vec<Release>;
|
||||||
|
|
||||||
@@ -948,6 +814,8 @@ mod crates_io {
|
|||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub(crate) struct Crate {
|
pub(crate) struct Crate {
|
||||||
pub(crate) versions: Vec<Version>,
|
pub(crate) versions: Vec<Version>,
|
||||||
|
#[serde(rename = "crate")]
|
||||||
|
pub(crate) crate_: CrateMetadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
@@ -957,6 +825,24 @@ mod crates_io {
|
|||||||
pub(crate) num: semver::Version,
|
pub(crate) num: semver::Version,
|
||||||
pub(crate) yanked: bool,
|
pub(crate) yanked: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
pub(crate) struct CrateMetadata {
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub(crate) homepage: Option<String>,
|
||||||
|
pub(crate) repository: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://crates.io/api/v1/crates/<crate>/<version>
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
pub(crate) struct VersionMetadata {
|
||||||
|
pub(crate) version: VersionMetadataDetail,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
pub(crate) struct VersionMetadataDetail {
|
||||||
|
pub(crate) license: Option<String>,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mod cargo_manifest {
|
mod cargo_manifest {
|
||||||
|
|||||||
238
tools/codegen/src/tools-markdown.rs
Normal file
238
tools/codegen/src/tools-markdown.rs
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||||
|
|
||||||
|
use std::{env, fmt, io::Write, path::PathBuf};
|
||||||
|
|
||||||
|
use anyhow::Result;
|
||||||
|
use fs_err as fs;
|
||||||
|
use install_action_internal_codegen::{workspace_root, BaseManifest, Manifests};
|
||||||
|
|
||||||
|
const HEADER: &str = "# Tools
|
||||||
|
|
||||||
|
This is a list of tools that are installed from manifests managed in this action.
|
||||||
|
|
||||||
|
If a tool not included in the list below is specified, this action uses [cargo-binstall] as a fallback.
|
||||||
|
|
||||||
|
> If `$CARGO_HOME/bin` is not available, Rust-related binaries will be installed to `$HOME/.cargo/bin`.<br>
|
||||||
|
> If `$HOME/.cargo/bin` is not available, Rust-related binaries will be installed to `/usr/local/bin`.<br>
|
||||||
|
> If `/usr/local/bin` is not available, binaries will be installed to `$HOME/.install-action/bin`.<br>
|
||||||
|
|
||||||
|
| Name | Where binaries will be installed | Where will it be installed from | Supported platform | License |
|
||||||
|
| ---- | -------------------------------- | ------------------------------- | ------------------ | ------- |
|
||||||
|
";
|
||||||
|
|
||||||
|
const FOOTER: &str = "
|
||||||
|
[cargo-binstall]: https://github.com/cargo-bins/cargo-binstall
|
||||||
|
";
|
||||||
|
|
||||||
|
fn main() -> Result<()> {
|
||||||
|
let args: Vec<_> = env::args().skip(1).collect();
|
||||||
|
if !args.is_empty() || args.iter().any(|arg| arg.starts_with('-')) {
|
||||||
|
println!(
|
||||||
|
"USAGE: cargo run --manifest-path tools/codegen/Cargo.toml --bin generate-tools-markdown --release"
|
||||||
|
);
|
||||||
|
std::process::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
let workspace_root = workspace_root();
|
||||||
|
|
||||||
|
let mut manifest_dir = workspace_root.clone();
|
||||||
|
manifest_dir.push("manifests");
|
||||||
|
let mut base_info_dir = workspace_root.clone();
|
||||||
|
base_info_dir.push("tools");
|
||||||
|
base_info_dir.push("codegen");
|
||||||
|
base_info_dir.push("base");
|
||||||
|
|
||||||
|
let mut paths: Vec<_> =
|
||||||
|
fs::read_dir(manifest_dir.clone()).unwrap().map(|r| r.unwrap()).collect();
|
||||||
|
paths.sort_by_key(fs_err::DirEntry::path);
|
||||||
|
|
||||||
|
let mut tools = vec OR [MIT](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-MIT)".to_string()
|
||||||
|
},
|
||||||
|
MarkdownEntry {
|
||||||
|
name: "valgrind".to_string(),
|
||||||
|
alias: None,
|
||||||
|
website: "https://valgrind.org/".to_string(),
|
||||||
|
installed_to: InstalledTo::Snap,
|
||||||
|
installed_from: InstalledFrom::Snap,
|
||||||
|
platforms: Platforms {
|
||||||
|
linux: true,
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
|
repository: "https://sourceware.org/git/valgrind.git".to_string(),
|
||||||
|
license_markdown: "[GPL-2.0](https://sourceware.org/git/?p=valgrind.git;a=blob;f=COPYING;hb=HEAD)".to_string()
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
for path in paths {
|
||||||
|
let file_name = path.file_name();
|
||||||
|
let mut name = PathBuf::from(file_name.clone());
|
||||||
|
name.set_extension("");
|
||||||
|
let name = name.to_string_lossy().to_string();
|
||||||
|
let base_info: BaseManifest =
|
||||||
|
serde_json::from_slice(&fs::read(base_info_dir.join(file_name.clone()))?)?;
|
||||||
|
let manifests: Manifests =
|
||||||
|
serde_json::from_slice(&fs::read(manifest_dir.join(file_name))?)?;
|
||||||
|
|
||||||
|
let website = match base_info.website {
|
||||||
|
Some(website) => website,
|
||||||
|
None => base_info.repository.clone(),
|
||||||
|
};
|
||||||
|
|
||||||
|
let repository = base_info.repository;
|
||||||
|
|
||||||
|
let installed_to =
|
||||||
|
if manifests.rust_crate.is_some() { InstalledTo::Cargo } else { InstalledTo::UsrLocal };
|
||||||
|
|
||||||
|
let installed_from = InstalledFrom::GitHubRelease;
|
||||||
|
let mut platforms = Platforms::default();
|
||||||
|
|
||||||
|
for platform in base_info.platform.keys() {
|
||||||
|
match platform.rust_target_os() {
|
||||||
|
"linux" => platforms.linux = true,
|
||||||
|
"macos" => platforms.macos = true,
|
||||||
|
"windows" => platforms.windows = true,
|
||||||
|
&_ => todo!(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let license_markdown = manifests.license_markdown;
|
||||||
|
|
||||||
|
let readme_entry = MarkdownEntry {
|
||||||
|
name,
|
||||||
|
website,
|
||||||
|
repository,
|
||||||
|
installed_to,
|
||||||
|
installed_from,
|
||||||
|
platforms,
|
||||||
|
license_markdown,
|
||||||
|
alias: None,
|
||||||
|
};
|
||||||
|
tools.push(readme_entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
tools.sort_by(|x, y| x.name.cmp(&y.name));
|
||||||
|
|
||||||
|
let mut markdown_file = workspace_root.clone();
|
||||||
|
markdown_file.push("TOOLS.md");
|
||||||
|
|
||||||
|
let file = std::fs::File::create(markdown_file).expect("Unable to create file");
|
||||||
|
let mut file = std::io::BufWriter::new(file);
|
||||||
|
|
||||||
|
file.write_all(HEADER.as_bytes()).expect("Unable to write header");
|
||||||
|
|
||||||
|
for tool in tools {
|
||||||
|
file.write_all(tool.to_string().as_bytes()).expect("Unable to write entry");
|
||||||
|
}
|
||||||
|
|
||||||
|
file.write_all(FOOTER.as_bytes()).expect("Unable to write footer");
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
struct MarkdownEntry {
|
||||||
|
name: String,
|
||||||
|
alias: Option<String>,
|
||||||
|
website: String,
|
||||||
|
repository: String,
|
||||||
|
installed_to: InstalledTo,
|
||||||
|
installed_from: InstalledFrom,
|
||||||
|
platforms: Platforms,
|
||||||
|
license_markdown: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Eq, PartialEq)]
|
||||||
|
enum InstalledFrom {
|
||||||
|
Binstall,
|
||||||
|
GitHubRelease,
|
||||||
|
Snap,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Default, Eq, PartialEq)]
|
||||||
|
struct Platforms {
|
||||||
|
linux: bool,
|
||||||
|
macos: bool,
|
||||||
|
windows: bool,
|
||||||
|
}
|
||||||
|
impl Platforms {
|
||||||
|
fn all() -> Self {
|
||||||
|
Self { linux: true, macos: true, windows: true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for Platforms {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
let mut platform_names: Vec<&str> = vec![];
|
||||||
|
if self.linux {
|
||||||
|
platform_names.push("Linux");
|
||||||
|
}
|
||||||
|
if self.macos {
|
||||||
|
platform_names.push("macOS");
|
||||||
|
}
|
||||||
|
if self.windows {
|
||||||
|
platform_names.push("Windows");
|
||||||
|
}
|
||||||
|
let name = platform_names.join(", ");
|
||||||
|
f.write_str(&name)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Eq, PartialEq)]
|
||||||
|
enum InstalledTo {
|
||||||
|
Cargo,
|
||||||
|
Snap,
|
||||||
|
UsrLocal,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for InstalledTo {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
match self {
|
||||||
|
InstalledTo::Cargo => f.write_str("`$CARGO_HOME/bin`")?,
|
||||||
|
InstalledTo::Snap => f.write_str("`/snap/bin`")?,
|
||||||
|
InstalledTo::UsrLocal => f.write_str("`/usr/local/bin`")?,
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for MarkdownEntry {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
let name = format!("| [**{}**]({}) ", self.name, self.website);
|
||||||
|
f.write_str(&name)?;
|
||||||
|
|
||||||
|
if let Some(alias) = self.alias.clone() {
|
||||||
|
let alias = format!("(alias: `{alias}`)");
|
||||||
|
f.write_str(&alias)?;
|
||||||
|
}
|
||||||
|
|
||||||
|
f.write_str(&format!("| {} ", self.installed_to))?;
|
||||||
|
|
||||||
|
match self.installed_from {
|
||||||
|
InstalledFrom::GitHubRelease => {
|
||||||
|
let markdown = format!("| [GitHub Releases]({}/releases) ", self.repository);
|
||||||
|
f.write_str(&markdown)?;
|
||||||
|
}
|
||||||
|
InstalledFrom::Binstall => f.write_str("| `cargo-binstall` ")?,
|
||||||
|
InstalledFrom::Snap => {
|
||||||
|
let markdown =
|
||||||
|
format!("| [snap](https://snapcraft.io/install/{}/ubuntu) ", self.name);
|
||||||
|
f.write_str(&markdown)?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f.write_str(&format!("| {} ", self.platforms))?;
|
||||||
|
f.write_str(&format!("| {} |\n", self.license_markdown))?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
171
tools/tidy.sh
171
tools/tidy.sh
@@ -16,7 +16,7 @@ trap 's=$?; echo >&2 "$0: error on line "${LINENO}": ${BASH_COMMAND}"; exit ${s}
|
|||||||
# - shellcheck
|
# - shellcheck
|
||||||
# - npm
|
# - npm
|
||||||
# - jq
|
# - jq
|
||||||
# - python
|
# - python 3
|
||||||
# - rustup (if Rust code exists)
|
# - rustup (if Rust code exists)
|
||||||
# - clang-format (if C/C++ code exists)
|
# - clang-format (if C/C++ code exists)
|
||||||
#
|
#
|
||||||
@@ -40,6 +40,19 @@ check_config() {
|
|||||||
error "could not found $1 in the repository root"
|
error "could not found $1 in the repository root"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
check_install() {
|
||||||
|
for tool in "$@"; do
|
||||||
|
if ! type -P "${tool}" &>/dev/null; then
|
||||||
|
if [[ "${tool}" == "python3" ]]; then
|
||||||
|
if type -P python &>/dev/null; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
error "'${tool}' is required to run this check"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
info() {
|
info() {
|
||||||
echo >&2 "info: $*"
|
echo >&2 "info: $*"
|
||||||
}
|
}
|
||||||
@@ -56,6 +69,27 @@ venv() {
|
|||||||
shift
|
shift
|
||||||
"${venv_bin}/${bin}${exe}" "$@"
|
"${venv_bin}/${bin}${exe}" "$@"
|
||||||
}
|
}
|
||||||
|
venv_install_yq() {
|
||||||
|
local py_suffix=''
|
||||||
|
if type -P python3 &>/dev/null; then
|
||||||
|
py_suffix='3'
|
||||||
|
fi
|
||||||
|
exe=''
|
||||||
|
venv_bin='.venv/bin'
|
||||||
|
case "$(uname -s)" in
|
||||||
|
MINGW* | MSYS* | CYGWIN* | Windows_NT)
|
||||||
|
exe='.exe'
|
||||||
|
venv_bin='.venv/Scripts'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [[ ! -d .venv ]]; then
|
||||||
|
"python${py_suffix}" -m venv .venv
|
||||||
|
fi
|
||||||
|
if [[ ! -e "${venv_bin}/yq${exe}" ]]; then
|
||||||
|
info "installing yq to ./.venv using pip"
|
||||||
|
venv "pip${py_suffix}" install yq
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [[ $# -gt 0 ]]; then
|
if [[ $# -gt 0 ]]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@@ -68,24 +102,23 @@ fi
|
|||||||
# Rust (if exists)
|
# Rust (if exists)
|
||||||
if [[ -n "$(git ls-files '*.rs')" ]]; then
|
if [[ -n "$(git ls-files '*.rs')" ]]; then
|
||||||
info "checking Rust code style"
|
info "checking Rust code style"
|
||||||
|
check_install cargo jq python3
|
||||||
check_config .rustfmt.toml
|
check_config .rustfmt.toml
|
||||||
if type -P rustup &>/dev/null; then
|
if check_install rustup; then
|
||||||
# `cargo fmt` cannot recognize files not included in the current workspace and modules
|
# `cargo fmt` cannot recognize files not included in the current workspace and modules
|
||||||
# defined inside macros, so run rustfmt directly.
|
# defined inside macros, so run rustfmt directly.
|
||||||
# We need to use nightly rustfmt because we use the unstable formatting options of rustfmt.
|
# We need to use nightly rustfmt because we use the unstable formatting options of rustfmt.
|
||||||
rustc_version=$(rustc -vV | grep '^release:' | cut -d' ' -f2)
|
rustc_version=$(rustc -vV | grep '^release:' | cut -d' ' -f2)
|
||||||
if [[ "${rustc_version}" == *"nightly"* ]] || [[ "${rustc_version}" == *"dev"* ]]; then
|
if [[ "${rustc_version}" == *"nightly"* ]] || [[ "${rustc_version}" == *"dev"* ]]; then
|
||||||
rustup component add rustfmt &>/dev/null
|
rustup component add rustfmt &>/dev/null
|
||||||
echo "+ rustfmt \$(git ls-files '*.rs')"
|
info "running \`rustfmt \$(git ls-files '*.rs')\`"
|
||||||
rustfmt $(git ls-files '*.rs')
|
rustfmt $(git ls-files '*.rs')
|
||||||
else
|
else
|
||||||
rustup component add rustfmt --toolchain nightly &>/dev/null
|
rustup component add rustfmt --toolchain nightly &>/dev/null
|
||||||
echo "+ rustfmt +nightly \$(git ls-files '*.rs')"
|
info "running \`rustfmt +nightly \$(git ls-files '*.rs')\`"
|
||||||
rustfmt +nightly $(git ls-files '*.rs')
|
rustfmt +nightly $(git ls-files '*.rs')
|
||||||
fi
|
fi
|
||||||
check_diff $(git ls-files '*.rs')
|
check_diff $(git ls-files '*.rs')
|
||||||
else
|
|
||||||
error "'rustup' is not installed; skipped Rust code style check"
|
|
||||||
fi
|
fi
|
||||||
cast_without_turbofish=$(grep -n -E '\.cast\(\)' $(git ls-files '*.rs') || true)
|
cast_without_turbofish=$(grep -n -E '\.cast\(\)' $(git ls-files '*.rs') || true)
|
||||||
if [[ -n "${cast_without_turbofish}" ]]; then
|
if [[ -n "${cast_without_turbofish}" ]]; then
|
||||||
@@ -122,11 +155,12 @@ if [[ -n "$(git ls-files '*.rs')" ]]; then
|
|||||||
binaries=''
|
binaries=''
|
||||||
metadata=$(cargo metadata --format-version=1 --no-deps)
|
metadata=$(cargo metadata --format-version=1 --no-deps)
|
||||||
has_public_crate=''
|
has_public_crate=''
|
||||||
|
venv_install_yq
|
||||||
for id in $(jq <<<"${metadata}" '.workspace_members[]'); do
|
for id in $(jq <<<"${metadata}" '.workspace_members[]'); do
|
||||||
pkg=$(jq <<<"${metadata}" ".packages[] | select(.id == ${id})")
|
pkg=$(jq <<<"${metadata}" ".packages[] | select(.id == ${id})")
|
||||||
publish=$(jq <<<"${pkg}" -r '.publish')
|
publish=$(jq <<<"${pkg}" -r '.publish')
|
||||||
manifest_path=$(jq <<<"${pkg}" -r '.manifest_path')
|
manifest_path=$(jq <<<"${pkg}" -r '.manifest_path')
|
||||||
if ! grep -q '^\[lints\]' "${manifest_path}" && ! grep -q '^\[lints\.rust\]' "${manifest_path}"; then
|
if [[ "$(venv tomlq -c '.lints' "${manifest_path}")" == "null" ]]; then
|
||||||
error "no [lints] table in ${manifest_path} please add '[lints]' with 'workspace = true'"
|
error "no [lints] table in ${manifest_path} please add '[lints]' with 'workspace = true'"
|
||||||
fi
|
fi
|
||||||
# Publishing is unrestricted if null, and forbidden if an empty array.
|
# Publishing is unrestricted if null, and forbidden if an empty array.
|
||||||
@@ -144,13 +178,14 @@ if [[ -n "$(git ls-files '*.rs')" ]]; then
|
|||||||
publish=$(jq <<<"${root_pkg}" -r '.publish')
|
publish=$(jq <<<"${root_pkg}" -r '.publish')
|
||||||
# Publishing is unrestricted if null, and forbidden if an empty array.
|
# Publishing is unrestricted if null, and forbidden if an empty array.
|
||||||
if [[ "${publish}" != "[]" ]]; then
|
if [[ "${publish}" != "[]" ]]; then
|
||||||
if ! grep -Eq '^exclude = \[.*"/\.\*".*\]' Cargo.toml; then
|
exclude=$(venv tomlq -r '.package.exclude[]' Cargo.toml)
|
||||||
|
if ! grep <<<"${exclude}" -Eq '^/\.\*$'; then
|
||||||
error "top-level Cargo.toml of non-virtual workspace should have 'exclude' field with \"/.*\""
|
error "top-level Cargo.toml of non-virtual workspace should have 'exclude' field with \"/.*\""
|
||||||
fi
|
fi
|
||||||
if [[ -e tools ]] && ! grep -Eq '^exclude = \[.*"/tools".*\]' Cargo.toml; then
|
if [[ -e tools ]] && ! grep <<<"${exclude}" -Eq '^/tools$'; then
|
||||||
error "top-level Cargo.toml of non-virtual workspace should have 'exclude' field with \"/tools\" if it exists"
|
error "top-level Cargo.toml of non-virtual workspace should have 'exclude' field with \"/tools\" if it exists"
|
||||||
fi
|
fi
|
||||||
if [[ -e target-specs ]] && ! grep -Eq '^exclude = \[.*"/target-specs".*\]' Cargo.toml; then
|
if [[ -e target-specs ]] && ! grep <<<"${exclude}" -Eq '^/target-specs$'; then
|
||||||
error "top-level Cargo.toml of non-virtual workspace should have 'exclude' field with \"/target-specs\" if it exists"
|
error "top-level Cargo.toml of non-virtual workspace should have 'exclude' field with \"/target-specs\" if it exists"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -196,12 +231,10 @@ fi
|
|||||||
if [[ -n "$(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')" ]]; then
|
if [[ -n "$(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')" ]]; then
|
||||||
info "checking C/C++ code style"
|
info "checking C/C++ code style"
|
||||||
check_config .clang-format
|
check_config .clang-format
|
||||||
if type -P clang-format &>/dev/null; then
|
if check_install clang-format; then
|
||||||
echo "+ clang-format -i \$(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')"
|
info "running \`clang-format -i \$(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')\`"
|
||||||
clang-format -i $(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')
|
clang-format -i $(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')
|
||||||
check_diff $(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')
|
check_diff $(git ls-files '*.c' '*.h' '*.cpp' '*.hpp')
|
||||||
else
|
|
||||||
error "'clang-format' is not installed; skipped C/C++ code style check"
|
|
||||||
fi
|
fi
|
||||||
elif [[ -e .clang-format ]]; then
|
elif [[ -e .clang-format ]]; then
|
||||||
error ".clang-format is unused"
|
error ".clang-format is unused"
|
||||||
@@ -211,64 +244,39 @@ fi
|
|||||||
if [[ -n "$(git ls-files '*.yml' '*.yaml' '*.js' '*.json')" ]]; then
|
if [[ -n "$(git ls-files '*.yml' '*.yaml' '*.js' '*.json')" ]]; then
|
||||||
info "checking YAML/JavaScript/JSON code style"
|
info "checking YAML/JavaScript/JSON code style"
|
||||||
check_config .editorconfig
|
check_config .editorconfig
|
||||||
if type -P npm &>/dev/null; then
|
if check_install npm; then
|
||||||
echo "+ npx -y prettier -l -w \$(git ls-files '*.yml' '*.yaml' '*.js' '*.json')"
|
info "running \`npx -y prettier -l -w \$(git ls-files '*.yml' '*.yaml' '*.js' '*.json')\`"
|
||||||
npx -y prettier -l -w $(git ls-files '*.yml' '*.yaml' '*.js' '*.json')
|
npx -y prettier -l -w $(git ls-files '*.yml' '*.yaml' '*.js' '*.json')
|
||||||
check_diff $(git ls-files '*.yml' '*.yaml' '*.js' '*.json')
|
check_diff $(git ls-files '*.yml' '*.yaml' '*.js' '*.json')
|
||||||
else
|
|
||||||
error "'npm' is not installed; skipped YAML/JavaScript/JSON code style check"
|
|
||||||
fi
|
fi
|
||||||
# Check GitHub workflows.
|
# Check GitHub workflows.
|
||||||
if [[ -d .github/workflows ]]; then
|
if [[ -d .github/workflows ]]; then
|
||||||
info "checking GitHub workflows"
|
info "checking GitHub workflows"
|
||||||
if type -P jq &>/dev/null; then
|
if check_install jq python3; then
|
||||||
if type -P python3 &>/dev/null || type -P python &>/dev/null; then
|
venv_install_yq
|
||||||
py_suffix=''
|
for workflow in .github/workflows/*.yml; do
|
||||||
if type -P python3 &>/dev/null; then
|
# The top-level permissions must be weak as they are referenced by all jobs.
|
||||||
py_suffix='3'
|
permissions=$(venv yq -c '.permissions' "${workflow}")
|
||||||
fi
|
case "${permissions}" in
|
||||||
exe=''
|
'{"contents":"read"}' | '{"contents":"none"}') ;;
|
||||||
venv_bin='.venv/bin'
|
null) error "${workflow}: top level permissions not found; it must be 'contents: read' or weaker permissions" ;;
|
||||||
case "$(uname -s)" in
|
*) error "${workflow}: only 'contents: read' and weaker permissions are allowed at top level; if you want to use stronger permissions, please set job-level permissions" ;;
|
||||||
MINGW* | MSYS* | CYGWIN* | Windows_NT)
|
|
||||||
exe='.exe'
|
|
||||||
venv_bin='.venv/Scripts'
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
if [[ ! -d .venv ]]; then
|
# Make sure the 'needs' section is not out of date.
|
||||||
"python${py_suffix}" -m venv .venv
|
if grep -q '# tidy:needs' "${workflow}" && ! grep -Eq '# *needs: \[' "${workflow}"; then
|
||||||
fi
|
# shellcheck disable=SC2207
|
||||||
if [[ ! -e "${venv_bin}/yq${exe}" ]]; then
|
jobs_actual=($(venv yq '.jobs' "${workflow}" | jq -r 'keys_unsorted[]'))
|
||||||
venv "pip${py_suffix}" install yq
|
unset 'jobs_actual[${#jobs_actual[@]}-1]'
|
||||||
fi
|
# shellcheck disable=SC2207
|
||||||
for workflow in .github/workflows/*.yml; do
|
jobs_expected=($(venv yq -r '.jobs."ci-success".needs[]' "${workflow}"))
|
||||||
# The top-level permissions must be weak as they are referenced by all jobs.
|
if [[ "${jobs_actual[*]}" != "${jobs_expected[*]+"${jobs_expected[*]}"}" ]]; then
|
||||||
permissions=$(venv yq -c '.permissions' "${workflow}")
|
printf -v jobs '%s, ' "${jobs_actual[@]}"
|
||||||
case "${permissions}" in
|
sed -i "s/needs: \[.*\] # tidy:needs/needs: [${jobs%, }] # tidy:needs/" "${workflow}"
|
||||||
'{"contents":"read"}' | '{"contents":"none"}') ;;
|
check_diff "${workflow}"
|
||||||
null) error "${workflow}: top level permissions not found; it must be 'contents: read' or weaker permissions" ;;
|
error "${workflow}: please update 'needs' section in 'ci-success' job"
|
||||||
*) error "${workflow}: only 'contents: read' and weaker permissions are allowed at top level; if you want to use stronger permissions, please set job-level permissions" ;;
|
|
||||||
esac
|
|
||||||
# Make sure the 'needs' section is not out of date.
|
|
||||||
if grep -q '# tidy:needs' "${workflow}" && ! grep -Eq '# *needs: \[' "${workflow}"; then
|
|
||||||
# shellcheck disable=SC2207
|
|
||||||
jobs_actual=($(venv yq '.jobs' "${workflow}" | jq -r 'keys_unsorted[]'))
|
|
||||||
unset 'jobs_actual[${#jobs_actual[@]}-1]'
|
|
||||||
# shellcheck disable=SC2207
|
|
||||||
jobs_expected=($(venv yq -r '.jobs."ci-success".needs[]' "${workflow}"))
|
|
||||||
if [[ "${jobs_actual[*]}" != "${jobs_expected[*]+"${jobs_expected[*]}"}" ]]; then
|
|
||||||
printf -v jobs '%s, ' "${jobs_actual[@]}"
|
|
||||||
sed -i "s/needs: \[.*\] # tidy:needs/needs: [${jobs%, }] # tidy:needs/" "${workflow}"
|
|
||||||
check_diff "${workflow}"
|
|
||||||
error "${workflow}: please update 'needs' section in 'ci-success' job"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
fi
|
||||||
else
|
done
|
||||||
error "'python3' is not installed; skipped GitHub workflow check"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
error "'jq' is not installed; skipped GitHub workflow check"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -281,12 +289,10 @@ fi
|
|||||||
if [[ -n "$(git ls-files '*.toml' | (grep -v .taplo.toml || true))" ]]; then
|
if [[ -n "$(git ls-files '*.toml' | (grep -v .taplo.toml || true))" ]]; then
|
||||||
info "checking TOML style"
|
info "checking TOML style"
|
||||||
check_config .taplo.toml
|
check_config .taplo.toml
|
||||||
if type -P npm &>/dev/null; then
|
if check_install npm; then
|
||||||
echo "+ npx -y @taplo/cli fmt \$(git ls-files '*.toml')"
|
info "running \`npx -y @taplo/cli fmt \$(git ls-files '*.toml')\`"
|
||||||
RUST_LOG=warn npx -y @taplo/cli fmt $(git ls-files '*.toml')
|
RUST_LOG=warn npx -y @taplo/cli fmt $(git ls-files '*.toml')
|
||||||
check_diff $(git ls-files '*.toml')
|
check_diff $(git ls-files '*.toml')
|
||||||
else
|
|
||||||
error "'npm' is not installed; skipped TOML style check"
|
|
||||||
fi
|
fi
|
||||||
elif [[ -e .taplo.toml ]]; then
|
elif [[ -e .taplo.toml ]]; then
|
||||||
error ".taplo.toml is unused"
|
error ".taplo.toml is unused"
|
||||||
@@ -296,11 +302,9 @@ fi
|
|||||||
if [[ -n "$(git ls-files '*.md')" ]]; then
|
if [[ -n "$(git ls-files '*.md')" ]]; then
|
||||||
info "checking Markdown style"
|
info "checking Markdown style"
|
||||||
check_config .markdownlint-cli2.yaml
|
check_config .markdownlint-cli2.yaml
|
||||||
if type -P npm &>/dev/null; then
|
if check_install npm; then
|
||||||
echo "+ npx -y markdownlint-cli2 \$(git ls-files '*.md')"
|
info "running \`npx -y markdownlint-cli2 \$(git ls-files '*.md')\`"
|
||||||
npx -y markdownlint-cli2 $(git ls-files '*.md')
|
npx -y markdownlint-cli2 $(git ls-files '*.md')
|
||||||
else
|
|
||||||
error "'npm' is not installed; skipped Markdown style check"
|
|
||||||
fi
|
fi
|
||||||
elif [[ -e .markdownlint-cli2.yaml ]]; then
|
elif [[ -e .markdownlint-cli2.yaml ]]; then
|
||||||
error ".markdownlint-cli2.yaml is unused"
|
error ".markdownlint-cli2.yaml is unused"
|
||||||
@@ -312,29 +316,25 @@ fi
|
|||||||
|
|
||||||
# Shell scripts
|
# Shell scripts
|
||||||
info "checking Shell scripts"
|
info "checking Shell scripts"
|
||||||
if type -P shfmt &>/dev/null; then
|
if check_install shfmt; then
|
||||||
check_config .editorconfig
|
check_config .editorconfig
|
||||||
echo "+ shfmt -l -w \$(git ls-files '*.sh')"
|
info "running \`shfmt -l -w \$(git ls-files '*.sh')\`"
|
||||||
shfmt -l -w $(git ls-files '*.sh')
|
shfmt -l -w $(git ls-files '*.sh')
|
||||||
check_diff $(git ls-files '*.sh')
|
check_diff $(git ls-files '*.sh')
|
||||||
else
|
|
||||||
error "'shfmt' is not installed; skipped Shell scripts style check"
|
|
||||||
fi
|
fi
|
||||||
if type -P shellcheck &>/dev/null; then
|
if check_install shellcheck; then
|
||||||
check_config .shellcheckrc
|
check_config .shellcheckrc
|
||||||
echo "+ shellcheck \$(git ls-files '*.sh')"
|
info "running \`shellcheck \$(git ls-files '*.sh')\`"
|
||||||
if ! shellcheck $(git ls-files '*.sh'); then
|
if ! shellcheck $(git ls-files '*.sh'); then
|
||||||
should_fail=1
|
should_fail=1
|
||||||
fi
|
fi
|
||||||
if [[ -n "$(git ls-files '*Dockerfile')" ]]; then
|
if [[ -n "$(git ls-files '*Dockerfile')" ]]; then
|
||||||
# SC2154 doesn't seem to work on dockerfile.
|
# SC2154 doesn't seem to work on dockerfile.
|
||||||
echo "+ shellcheck -e SC2148,SC2154,SC2250 \$(git ls-files '*Dockerfile')"
|
info "running \`shellcheck -e SC2148,SC2154,SC2250 \$(git ls-files '*Dockerfile')\`"
|
||||||
if ! shellcheck -e SC2148,SC2154,SC2250 $(git ls-files '*Dockerfile'); then
|
if ! shellcheck -e SC2148,SC2154,SC2250 $(git ls-files '*Dockerfile'); then
|
||||||
should_fail=1
|
should_fail=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
error "'shellcheck' is not installed; skipped Shell scripts style check"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# License check
|
# License check
|
||||||
@@ -383,13 +383,14 @@ fi
|
|||||||
if [[ -f .cspell.json ]]; then
|
if [[ -f .cspell.json ]]; then
|
||||||
info "spell checking"
|
info "spell checking"
|
||||||
project_dictionary=.github/.cspell/project-dictionary.txt
|
project_dictionary=.github/.cspell/project-dictionary.txt
|
||||||
if type -P npm &>/dev/null; then
|
if check_install npm jq python3; then
|
||||||
has_rust=''
|
has_rust=''
|
||||||
if [[ -n "$(git ls-files '*Cargo.toml')" ]]; then
|
if [[ -n "$(git ls-files '*Cargo.toml')" ]]; then
|
||||||
|
venv_install_yq
|
||||||
has_rust='1'
|
has_rust='1'
|
||||||
dependencies=''
|
dependencies=''
|
||||||
for manifest_path in $(git ls-files '*Cargo.toml'); do
|
for manifest_path in $(git ls-files '*Cargo.toml'); do
|
||||||
if [[ "${manifest_path}" != "Cargo.toml" ]] && ! grep -Eq '\[workspace\]' "${manifest_path}"; then
|
if [[ "${manifest_path}" != "Cargo.toml" ]] && [[ "$(venv tomlq -c '.workspace' "${manifest_path}")" == "null" ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
metadata=$(cargo metadata --format-version=1 --no-deps --manifest-path "${manifest_path}")
|
metadata=$(cargo metadata --format-version=1 --no-deps --manifest-path "${manifest_path}")
|
||||||
@@ -422,7 +423,7 @@ EOF
|
|||||||
error "you may want to mark .github/.cspell/rust-dependencies.txt linguist-generated"
|
error "you may want to mark .github/.cspell/rust-dependencies.txt linguist-generated"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "+ npx -y cspell --no-progress --no-summary \$(git ls-files)"
|
info "running \`npx -y cspell --no-progress --no-summary \$(git ls-files)\`"
|
||||||
if ! npx -y cspell --no-progress --no-summary $(git ls-files); then
|
if ! npx -y cspell --no-progress --no-summary $(git ls-files); then
|
||||||
error "spellcheck failed: please fix uses of above words or add to ${project_dictionary} if correct"
|
error "spellcheck failed: please fix uses of above words or add to ${project_dictionary} if correct"
|
||||||
fi
|
fi
|
||||||
@@ -454,8 +455,6 @@ EOF
|
|||||||
echo -n "${unused}"
|
echo -n "${unused}"
|
||||||
echo "======================================="
|
echo "======================================="
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
error "'npm' is not installed; skipped spell check"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
12
tools/update-markdown.sh
Executable file
12
tools/update-markdown.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||||
|
set -eEuo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
|
# Update markdown
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# ./tools/update-markdown.sh
|
||||||
|
|
||||||
|
cargo run --manifest-path tools/codegen/Cargo.toml --bin generate-tools-markdown --release
|
||||||
Reference in New Issue
Block a user