diff --git a/.github/.cspell/project-dictionary.txt b/.github/.cspell/project-dictionary.txt index 0cf8132b..1c0612a0 100644 --- a/.github/.cspell/project-dictionary.txt +++ b/.github/.cspell/project-dictionary.txt @@ -13,6 +13,7 @@ espup fastestmirror grcov knope +libicu linkcheck mdbook microdnf diff --git a/TOOLS.md b/TOOLS.md index 2913a49b..ac4527ea 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -38,6 +38,7 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho | [**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) | | [**cargo-zigbuild**](https://github.com/rust-cross/cargo-zigbuild) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-cross/cargo-zigbuild/releases) | Linux, macOS, Windows | [MIT](https://github.com/rust-cross/cargo-zigbuild/blob/main/LICENSE) | | [**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) | +| [**cyclonedx**](https://github.com/CycloneDX/cyclonedx-cli) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/CycloneDX/cyclonedx-cli/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/CycloneDX/cyclonedx-cli/blob/main/LICENSE) | | [**deepsource**](https://github.com/DeepSourceCorp/cli) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/DeepSourceCorp/cli/releases) | Linux, macOS, Windows | [BSD-2-Clause](https://github.com/DeepSourceCorp/cli/blob/master/LICENSE) | | [**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) | | [**earthly**](https://github.com/earthly/earthly) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/earthly/earthly/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/earthly/earthly/blob/main/LICENSE) | diff --git a/main.sh b/main.sh index 94d916ec..9b4c4296 100755 --- a/main.sh +++ b/main.sh @@ -776,6 +776,13 @@ for tool in "${tools[@]}"; do ;; esac ;; + cyclonedx) + case "${host_os}" in + linux) + apt_install libicu-dev + ;; + esac + ;; esac download_from_download_info "${tool}" "${version}" diff --git a/manifests/cyclonedx.json b/manifests/cyclonedx.json new file mode 100644 index 00000000..7454ede4 --- /dev/null +++ b/manifests/cyclonedx.json @@ -0,0 +1,56 @@ +{ + "rust_crate": null, + "template": { + "x86_64_linux_gnu": { + "url": "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${version}/cyclonedx-linux-x64" + }, + "x86_64_macos": { + "url": "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${version}/cyclonedx-osx-x64" + }, + "x86_64_windows": { + "url": "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${version}/cyclonedx-win-x64.exe" + }, + "aarch64_linux_gnu": { + "url": "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${version}/cyclonedx-linux-arm64" + }, + "aarch64_macos": { + "url": "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${version}/cyclonedx-osx-arm64" + }, + "aarch64_windows": { + "url": "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${version}/cyclonedx-win-arm64.exe" + } + }, + "license_markdown": "[Apache-2.0](https://github.com/CycloneDX/cyclonedx-cli/blob/main/LICENSE)", + "latest": { + "version": "0.27.2" + }, + "0.27": { + "version": "0.27.2" + }, + "0.27.2": { + "x86_64_linux_gnu": { + "etag": "0x8DD0C1D089A2E0C", + "checksum": "5e1595542a6367378a3944bbd3008caab3de65d572345361d3b9597b1dbbaaa0" + }, + "x86_64_macos": { + "etag": "0x8DD0C1D112585AB", + "checksum": "331c2245ef7dadf09fa3d2710a2aaab071ff6bea2ba3e5df8f95a4f3f6e825e9" + }, + "x86_64_windows": { + "etag": "0x8DD0C1D0CEB17DF", + "checksum": "bb26bb56293ebe6f08fa63d2bf50653fc6b180174fded975c81ac96ac192a7db" + }, + "aarch64_linux_gnu": { + "etag": "0x8DD0C1D0BAFB51E", + "checksum": "5b4181f6fd4d8fbe54e55c1b3983d9af66ce2910a263814b290cbd5e351e68a4" + }, + "aarch64_macos": { + "etag": "0x8DD0C1D488DD343", + "checksum": "2d24c331c2ccc5e4061722bd4780c8b295041b2569d130bbe80cf7da95b97171" + }, + "aarch64_windows": { + "etag": "0x8DD0C1D10099579", + "checksum": "35762d3e1979576f474ffc1c5b2273e19c33cdca44e5f1994c3de5d9cd0e9c1d" + } + } +} diff --git a/tools/ci/tool-list.sh b/tools/ci/tool-list.sh index 3b926c7d..9b91fa37 100755 --- a/tools/ci/tool-list.sh +++ b/tools/ci/tool-list.sh @@ -108,6 +108,9 @@ case "$(uname -s)" in if ! type -P snap >/dev/null; then incompat_tools+=(valgrind) fi + if ! type -P apt-get >/dev/null; then + incompat_tools+=(cyclonedx) + fi ;; Darwin) host_os=macos ;; MINGW* | MSYS* | CYGWIN* | Windows_NT) host_os=windows ;; diff --git a/tools/codegen/base/biome.json b/tools/codegen/base/biome.json index 9b3e9b27..befb0daf 100644 --- a/tools/codegen/base/biome.json +++ b/tools/codegen/base/biome.json @@ -5,9 +5,6 @@ "tag_prefix": "cli/v", "bin": "${package}${exe}", "platform": { - "x86_64_linux_gnu": { - "asset_name": "${package}-linux-x64" - }, "x86_64_linux_musl": { "asset_name": "${package}-linux-x64-musl" }, @@ -17,9 +14,6 @@ "x86_64_windows": { "asset_name": "${package}-win32-x64${exe}" }, - "aarch64_linux_gnu": { - "asset_name": "${package}-linux-arm64" - }, "aarch64_linux_musl": { "asset_name": "${package}-linux-arm64-musl" }, diff --git a/tools/codegen/base/cargo-cyclonedx.json b/tools/codegen/base/cargo-cyclonedx.json index aa033b5b..a9ffaa43 100644 --- a/tools/codegen/base/cargo-cyclonedx.json +++ b/tools/codegen/base/cargo-cyclonedx.json @@ -5,9 +5,6 @@ "bin": "${package}-${rust_target}/${package}${exe}", "version_range": ">= 0.5.0", "platform": { - "x86_64_linux_gnu": { - "asset_name": "${package}-linux-amd64.tar.gz" - }, "x86_64_linux_musl": { "asset_name": "${package}-${rust_target}.tar.xz" }, diff --git a/tools/codegen/base/cargo-hack.json b/tools/codegen/base/cargo-hack.json index 332aed9f..1d337547 100644 --- a/tools/codegen/base/cargo-hack.json +++ b/tools/codegen/base/cargo-hack.json @@ -9,7 +9,6 @@ "${package}-v${version}-${rust_target}.zip" ], "platform": { - "x86_64_linux_gnu": {}, "x86_64_linux_musl": {}, "x86_64_macos": {}, "x86_64_windows": {}, diff --git a/tools/codegen/base/cargo-udeps.json b/tools/codegen/base/cargo-udeps.json index dc41a9d2..51e20aaa 100644 --- a/tools/codegen/base/cargo-udeps.json +++ b/tools/codegen/base/cargo-udeps.json @@ -6,7 +6,6 @@ "asset_name": "${package}-v${version}-${rust_target}.tar.gz", "bin": "./${package}-v${version}-${rust_target}/${package}${exe}", "platform": { - "x86_64_linux_gnu": {}, "x86_64_linux_musl": {}, "x86_64_macos": {}, "x86_64_windows": { diff --git a/tools/codegen/base/cyclonedx.json b/tools/codegen/base/cyclonedx.json new file mode 100644 index 00000000..52514b48 --- /dev/null +++ b/tools/codegen/base/cyclonedx.json @@ -0,0 +1,25 @@ +{ + "repository": "https://github.com/CycloneDX/cyclonedx-cli", + "tag_prefix": "v", + "version_range": ">= 0.27.2", + "platform": { + "x86_64_linux_gnu": { + "asset_name": "${package}-linux-x64" + }, + "x86_64_macos": { + "asset_name": "${package}-osx-x64" + }, + "x86_64_windows": { + "asset_name": "${package}-win-x64${exe}" + }, + "aarch64_linux_gnu": { + "asset_name": "${package}-linux-arm64" + }, + "aarch64_macos": { + "asset_name": "${package}-osx-arm64" + }, + "aarch64_windows": { + "asset_name": "${package}-win-arm64${exe}" + } + } +} diff --git a/tools/codegen/base/dprint.json b/tools/codegen/base/dprint.json index 022e793a..2b5c70f3 100644 --- a/tools/codegen/base/dprint.json +++ b/tools/codegen/base/dprint.json @@ -4,7 +4,6 @@ "rust_crate": "${package}", "asset_name": "${package}-${rust_target}.zip", "platform": { - "x86_64_linux_gnu": {}, "x86_64_linux_musl": {}, "x86_64_macos": {}, "x86_64_windows": {}, diff --git a/tools/codegen/base/mdbook.json b/tools/codegen/base/mdbook.json index ef854529..5b7d797b 100644 --- a/tools/codegen/base/mdbook.json +++ b/tools/codegen/base/mdbook.json @@ -6,7 +6,6 @@ "version_range": ">= 0.1.0", "platform": { "x86_64_linux_musl": {}, - "x86_64_linux_gnu": {}, "x86_64_macos": {}, "x86_64_windows": { "asset_name": "${package}-v${version}-${rust_target}.zip" diff --git a/tools/codegen/base/parse-changelog.json b/tools/codegen/base/parse-changelog.json index b8d42f48..512c00fa 100644 --- a/tools/codegen/base/parse-changelog.json +++ b/tools/codegen/base/parse-changelog.json @@ -7,7 +7,6 @@ "${package}-${rust_target}.zip" ], "platform": { - "x86_64_linux_gnu": {}, "x86_64_linux_musl": {}, "x86_64_macos": {}, "x86_64_windows": {}, diff --git a/tools/codegen/src/main.rs b/tools/codegen/src/main.rs index 3d9cd0fc..f1abc07a 100644 --- a/tools/codegen/src/main.rs +++ b/tools/codegen/src/main.rs @@ -562,7 +562,6 @@ fn main() -> Result<()> { .values() .any(|m| matches!(m, ManifestRef::Real(m) if m.download_info.contains_key(&p))) { - // TODO: better error message: https://github.com/taiki-e/install-action/pull/411 bail!( "platform list in base manifest for {package} contains {p:?}, \ but result manifest doesn't contain it; \ diff --git a/tools/manifest-schema/src/lib.rs b/tools/manifest-schema/src/lib.rs index 332da160..05ae43b3 100644 --- a/tools/manifest-schema/src/lib.rs +++ b/tools/manifest-schema/src/lib.rs @@ -282,6 +282,19 @@ impl BaseManifest { } } } + if self.platform.is_empty() { + panic!("At least one platform must be specified"); + } + if !self.prefer_linux_gnu + && (self.platform.contains_key(&HostPlatform::x86_64_linux_gnu) + && self.platform.contains_key(&HostPlatform::x86_64_linux_musl)) + && (self.platform.contains_key(&HostPlatform::aarch64_linux_gnu) + && self.platform.contains_key(&HostPlatform::aarch64_linux_musl)) + { + panic!( + "When *-linux-musl platform is specified, *-linux-gnu for the same architecture will never be used and should not be specified" + ); + } } }