From 7e750de5db71246751ebc0bb370a7f57cba35670 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sat, 10 Jun 2023 07:00:18 -0700 Subject: [PATCH] Add support for cargo-dinghy (#133) --- .github/workflows/ci.yml | 22 +-- README.md | 1 + manifests/cargo-dinghy.json | 280 +++++++++++++++++++++++++++ tools/codegen/base/cargo-dinghy.json | 10 + tools/codegen/src/main.rs | 13 +- 5 files changed, 314 insertions(+), 12 deletions(-) create mode 100644 manifests/cargo-dinghy.json create mode 100644 tools/codegen/base/cargo-dinghy.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbd6f6440..c7a7ca2f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,17 +44,17 @@ jobs: tool: # cargo-watch/watchexec-cli is supported by cargo-binstall (through quickinstall) # TODO: valgrind installation sometime hangs. - - cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola,syft + - cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola,syft include: # Note: Specifying the version of valgrind and cargo-binstall is not supported. - os: ubuntu-20.04 - tool: cargo-hack@0.5.24,cargo-llvm-cov@0.5.3,cargo-minimal-versions@0.1.8,cargo-no-dev-deps@0.1.0,parse-changelog@0.5.2,cargo-udeps@0.1.35,cargo-valgrind@2.1.0,cargo-deny@0.13.5,cross@0.2.4,dprint@0.34.1,just@1.9.0,nextest@0.9.11,protoc@3.21.12,shellcheck@0.9.0,shfmt@3.6.0,wasm-pack@0.10.3,wasmtime@4.0.0,mdbook@0.4.25,mdbook-linkcheck@0.7.7,cargo-watch@8.1.1,grcov@0.8.13,watchexec-cli@1.20.5,cargo-tarpaulin@0.25.0,zola@0.16.1,syft@0.83.0 + tool: cargo-dinghy@0.6.4,cargo-hack@0.5.24,cargo-llvm-cov@0.5.3,cargo-minimal-versions@0.1.8,cargo-no-dev-deps@0.1.0,parse-changelog@0.5.2,cargo-udeps@0.1.35,cargo-valgrind@2.1.0,cargo-deny@0.13.5,cross@0.2.4,dprint@0.34.1,just@1.9.0,nextest@0.9.11,protoc@3.21.12,shellcheck@0.9.0,shfmt@3.6.0,wasm-pack@0.10.3,wasmtime@4.0.0,mdbook@0.4.25,mdbook-linkcheck@0.7.7,cargo-watch@8.1.1,grcov@0.8.13,watchexec-cli@1.20.5,cargo-tarpaulin@0.25.0,zola@0.16.1,syft@0.83.0 - os: ubuntu-20.04 - tool: cargo-hack@0.5,cargo-llvm-cov@0.5,cargo-minimal-versions@0.1,cargo-no-dev-deps@0.1,parse-changelog@0.5,cargo-udeps@0.1,cargo-valgrind@2.1,cargo-deny@0.13,cross@0.2,dprint@0.34,just@1.9,nextest@0.9,protoc@3.21,shellcheck@0.9,shfmt@3.5,wasm-pack@0.10,wasmtime@6.0,mdbook@0.4,mdbook-linkcheck@0.7,cargo-watch@8.1,grcov@0.8,watchexec-cli@1.20,cargo-tarpaulin@0.25,zola@0.16,syft@0.83 + tool: cargo-dinghy@0.6,cargo-hack@0.5,cargo-llvm-cov@0.5,cargo-minimal-versions@0.1,cargo-no-dev-deps@0.1,parse-changelog@0.5,cargo-udeps@0.1,cargo-valgrind@2.1,cargo-deny@0.13,cross@0.2,dprint@0.34,just@1.9,nextest@0.9,protoc@3.21,shellcheck@0.9,shfmt@3.5,wasm-pack@0.10,wasmtime@6.0,mdbook@0.4,mdbook-linkcheck@0.7,cargo-watch@8.1,grcov@0.8,watchexec-cli@1.20,cargo-tarpaulin@0.25,zola@0.16,syft@0.83 - os: ubuntu-20.04 tool: cargo-valgrind@2, just@1,protoc@3 , shfmt@3 ,wasmtime@7,cargo-watch@8,watchexec-cli@1 - os: macos-11 - tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola,syft + tool: cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola,syft - os: windows-2019 tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola,syft runs-on: ${{ matrix.os }} @@ -104,25 +104,25 @@ jobs: - fedora:latest # glibc 2.36 (as of fedora 37) tool: # valgrind: installing snap to container is difficult... - - cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola,syft + - cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola,syft include: # glibc < 2.31 # zola don't provide prebuilt binaries for musl or old glibc host. - container: ubuntu:18.04 # glibc 2.27 - tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft + tool: cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft - container: debian:10-slim # glibc 2.28 - tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft + tool: cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft - container: rockylinux:8 # glibc 2.28 - tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft + tool: cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft - container: rockylinux:8-minimal # glibc 2.28 - tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft + tool: cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,syft # glibc < 2.27 or musl - container: centos:7 # glibc 2.17 # protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch,zola don't provide prebuilt binaries for musl or old glibc host. - tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall,grcov,watchexec-cli,cargo-tarpaulin,syft + tool: cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall,grcov,watchexec-cli,cargo-tarpaulin,syft - container: alpine:latest # musl 1.2.3 (as of alpine 3.17) # protoc,valgrind,wasmtime,mdbook-linkcheck,cargo-watch,zola don't provide prebuilt binaries for musl host. - tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall,grcov,watchexec-cli,cargo-tarpaulin,syft + tool: cargo-dinghy,cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,shellcheck,shfmt,wasm-pack,mdbook,cargo-binstall,grcov,watchexec-cli,cargo-tarpaulin,syft runs-on: ubuntu-latest timeout-minutes: 60 container: ${{ matrix.container }} diff --git a/README.md b/README.md index 27e4851d6..280ec578b 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ https://spdx.org/licenses | ---- | -------------------------------- | ------------------------------- | ------------------ | ------- | | [**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-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-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-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) | diff --git a/manifests/cargo-dinghy.json b/manifests/cargo-dinghy.json new file mode 100644 index 000000000..de5915d3a --- /dev/null +++ b/manifests/cargo-dinghy.json @@ -0,0 +1,280 @@ +{ + "template": { + "x86_64_linux_musl": { + "url": "https://github.com/sonos/dinghy/releases/download/${version}/cargo-dinghy-linux-${version}.tgz", + "bin": "cargo-dinghy-${version}/cargo-dinghy" + }, + "x86_64_macos": { + "url": "https://github.com/sonos/dinghy/releases/download/${version}/cargo-dinghy-macos-${version}.tgz", + "bin": "cargo-dinghy-${version}/cargo-dinghy" + } + }, + "latest": { + "version": "0.6.4" + }, + "0.6": { + "version": "0.6.4" + }, + "0.6.4": { + "x86_64_linux_musl": { + "checksum": "b1453cff8f0f65f09312e88306e64e4c55bba5fb6daec5d8df1ab0ca4acef97f" + }, + "x86_64_macos": { + "checksum": "4fd0f5cabbdeb6fe5728c54e888c3c6b3861d7cdb8e089caa5c1ea43f618e812" + } + }, + "0.6.3": { + "x86_64_linux_musl": { + "checksum": "4faa2b0ba479222284f90885f66d0afc97ecee4e2b234042912a451fbd7b8dc8" + }, + "x86_64_macos": { + "checksum": "343d7e8de208a5ef2eca4b3db1653a626efa135643203a7813d0831a7eb6b7df" + } + }, + "0.6.2": { + "x86_64_linux_musl": { + "checksum": "b6cd5b91e61a14befa3260802bb387ef6b8deba78dad0fd8ab80d487319140e9" + }, + "x86_64_macos": { + "checksum": "f6fd261b70844ca13dc69cdb2668e14691676e92188f82d4fcf1ade6900d6f90" + } + }, + "0.6.1": { + "x86_64_linux_musl": { + "checksum": "1016d349f40f54332ba7269926d4e1a56295bb54c27fc0ff5b137d68f6ffa6d4" + }, + "x86_64_macos": { + "checksum": "6b3fb17fd3117f728a41b34c1728bba35f85bbee6ad7e7402ae9ab5fefb2409f" + } + }, + "0.6.0": { + "x86_64_linux_musl": { + "checksum": "3755cd6187bf8192f359809143c080618acf9777a0d7a3351ecde6f67a4cfc47" + }, + "x86_64_macos": { + "checksum": "907319443f0742c607773124209bf0f3c572a35b18819bfe126a487cbc1128c6" + } + }, + "0.5": { + "version": "0.5.1" + }, + "0.5.1": { + "x86_64_linux_musl": { + "checksum": "ded1f77c4514d763977eabe069fa62625745098715c54ad8427502557c412f05" + }, + "x86_64_macos": { + "checksum": "ac105b5ef370a0920794c07af2b69fb33ea17e56ba55be2e189f080556f05112" + } + }, + "0.5.0": { + "x86_64_linux_musl": { + "checksum": "e1f65a240c6e3587cd661d3b004e5af3da9f2b9c4e44f465e87f3717371d05fa" + }, + "x86_64_macos": { + "checksum": "5bf0facc0d9864fd79026999ce8b9a8f3f56b40c15e0536aa98551d8750ad01a" + } + }, + "0.4": { + "version": "0.4.71" + }, + "0.4.71": { + "x86_64_linux_musl": { + "checksum": "64115114488ffc8b7006d2f9f35d19baba6e3acd2292133aac2dd64d24e59d99" + }, + "x86_64_macos": { + "checksum": "db8bec9f9ad41e166bc1e212d0b9bf732bd1b3a1c1e49f1862042aa2dfcfdf2f" + } + }, + "0.4.70": { + "x86_64_linux_musl": { + "checksum": "880ea253cdf3b989e9b45dba36e66abf9fa358bd805cdfced57437099eb00d21" + }, + "x86_64_macos": { + "checksum": "a0a42c3f5825be8116978083428283e92143f320c80a11a6f5133e559642984c" + } + }, + "0.4.69": { + "x86_64_linux_musl": { + "checksum": "b42985472ff399a6e00e1590cbc6dbe576b6a1c23bf36e9369898ba7152c72ff" + }, + "x86_64_macos": { + "checksum": "aff25a81d3e99a0ba677a56f16860f915749fb0fa5a3ef10bb381b9a84d1e78f" + } + }, + "0.4.68": { + "x86_64_linux_musl": { + "checksum": "8b17bbe806b459ac7f2692d1df9bdec5fabdc46513cb45f620b0a4124d0c8bdb" + }, + "x86_64_macos": { + "checksum": "5883927469c45ac952a0785aea9a625dc3d158f0d03ee23e0ae7525659041453" + } + }, + "0.4.67": { + "x86_64_linux_musl": { + "checksum": "e4175dbcb96abacdceee60055495e315bd065cbf66a3741ef7294f1d9b944448" + }, + "x86_64_macos": { + "checksum": "2a4e0f23799335f3bcc04f5177772b3ae8178f69a1d20b1ea9a1e0a2af5d649e" + } + }, + "0.4.66": { + "x86_64_linux_musl": { + "checksum": "10664353ce1ed10cefdf766bd9acbb9c357497011d11f281ba1d3ec24eb8a7f7" + }, + "x86_64_macos": { + "checksum": "f76bd70d0f82bf31e61118eaaa5fb4912540276050f7a59d056b365614f65e5e" + } + }, + "0.4.63": { + "x86_64_linux_musl": { + "checksum": "bbd791675e71e5ba4165d0fbde08c1572fa3771f12169b29831ff43b212578b2" + }, + "x86_64_macos": { + "checksum": "3b4533a3e3020836abd864ddd52aa219b2eec2081a6aa376c78ce6ba37707421" + } + }, + "0.4.62": { + "x86_64_linux_musl": { + "checksum": "2da0eb7a004344a845010ecbe10a92b1ea1576ea0c98cd57836fc0ce4855b675" + }, + "x86_64_macos": { + "checksum": "980a8a88b5f3e950d9af8aa6a2ce6e4dfe391fcc345a082b124db2f09af85dbc" + } + }, + "0.4.61": { + "x86_64_linux_musl": { + "checksum": "8d1db2698c9684b000e1e0df4675a5db28228c97c6b8a15240c4498af4575005" + }, + "x86_64_macos": { + "checksum": "04fde09f40e409a6a33943bbdeb2e7a37703b6b554fa9ffe3b3d8c02139400ce" + } + }, + "0.4.60": { + "x86_64_linux_musl": { + "checksum": "9881f4de90449c9251dbb9eeab85b7d73fb3c52219e0c044aa38afa6da7c0c86" + }, + "x86_64_macos": { + "checksum": "feb68d4168542f09f4672241f41edc1dd1dfff10bb7376b393f7fc42ecb60a14" + } + }, + "0.4.59": { + "x86_64_linux_musl": { + "checksum": "3d406ad00263c207ef339f570f8b2dc4a70bb040b11f81cbc4f61b8fa485d63a" + }, + "x86_64_macos": { + "checksum": "19e9981cfa7d4564161990eb3d45855feb4caade42100f7681e5151aa177a2c5" + } + }, + "0.4.57": { + "x86_64_linux_musl": { + "checksum": "a15252b2c0707c627a5b24ac3d21754046098ddbbc1b792fc981f844cbf74786" + }, + "x86_64_macos": { + "checksum": "e1ba97310da861ef608fe2fcebb3251c2904bf4c5f059fd62a9654216ec75a31" + } + }, + "0.4.55": { + "x86_64_linux_musl": { + "checksum": "a1eb166f015cb1a07e48e2bd44ec15bd370cf9f8a3d40d243f8ec35e71df983f" + }, + "x86_64_macos": { + "checksum": "cb63021c7f9f415513ee8a5589b59b54dd1bce0b55eb2728c677f2e552b4a115" + } + }, + "0.4.51": { + "x86_64_linux_musl": { + "checksum": "314d220264417960539db8a9cb1e8b81d010acc64e1d3e8bfcd3415608cea857" + }, + "x86_64_macos": { + "checksum": "cc66108a0f2fb30a016c4400af5cb9e308b1c1217c696b3412dce4069722df78" + } + }, + "0.4.50": { + "x86_64_linux_musl": { + "checksum": "6c885144ace5e9a064d5f201b8836418ce511266335eb56e72f6cfee3377abae" + }, + "x86_64_macos": { + "checksum": "36606130a6c1a9aaa398063df59749961d0bea0973740a610e157154e459dfec" + } + }, + "0.4.48": { + "x86_64_linux_musl": { + "checksum": "a5ba0ff38a074edf9b16e1d10a550b567236953c11f2f92414b56877364bf02e" + }, + "x86_64_macos": { + "checksum": "d892bcc9d5976f6e0eb7ec56ce06bbb10d777fce8f2b61a494544a99dc57a8e3" + } + }, + "0.4.47": { + "x86_64_linux_musl": { + "checksum": "3a7bad503bd2af5884acba5fd1d36a053610e4ffbf2bd2f32def3a125a388c0b" + }, + "x86_64_macos": { + "checksum": "dabd2b1e836a3ed0493fe86a51dbd64edc53bd1fe12418f23ab1241a28a4d49f" + } + }, + "0.4.46": { + "x86_64_linux_musl": { + "checksum": "5bf5c74385f8f629fc22842db9f22a017ce1161ab18695d3b673bef0767908c3" + }, + "x86_64_macos": { + "checksum": "8c7c03acda02eeaac85c58d1bc2b4eaeadc86bd001a547bd83170e5a799de9e7" + } + }, + "0.4.41": { + "x86_64_linux_musl": { + "checksum": "30c25753544b0d7ced2341ee01b732031739f1611ee9792a900544f2330c3af6" + }, + "x86_64_macos": { + "checksum": "fb0744858e9b62c3df157806490ccb7484391d1e22d965cb395943b5ad99d047" + } + }, + "0.4.40": { + "x86_64_linux_musl": { + "checksum": "5d0348b5b6361c2654543e4fdcb4adf3138c2acabb84a4b31c0b4296420ca1bc" + }, + "x86_64_macos": { + "checksum": "8ec452814f1660377e6c04ef7a896dcd036421ae60804f1a6d1a2a48c38abb0b" + } + }, + "0.4.39": { + "x86_64_linux_musl": { + "checksum": "4d6bdd598600ea70085fdedfd425faa6527e337819f23b998cc1deb5e01a6fd5" + }, + "x86_64_macos": { + "checksum": "c03237fdf92eff3a7b5ce678684cf0b3fed7b35c5c644c5dd56dba60083d36b1" + } + }, + "0.4.38": { + "x86_64_linux_musl": { + "checksum": "4bd472b5e3718d08118f08bd2ac0fbd0ce28ddbf022314b66d2a9c61a7a55615" + }, + "x86_64_macos": { + "checksum": "a38ac1de5862efc36a772234c59f002894d2c6ec1924b11a36d0ecbba59a1411" + } + }, + "0.4.37": { + "x86_64_linux_musl": { + "checksum": "b22e585e24363971eb925c66cb9ff3ad97612aba7264d0a27eaad871f9f3b02a" + }, + "x86_64_macos": { + "checksum": "fa3b17fdc8615feb0633c513bde8f8ada9bca21a5aaf6c32567c850a19f1a9d7" + } + }, + "0.4.35": { + "x86_64_linux_musl": { + "checksum": "8d10ff10fa6d4974c71fd0804d65901a88e17c472fded202c6215bc31cbb4eac" + }, + "x86_64_macos": { + "checksum": "f086fd58fba784a26db8989f85ece81df6b2c0400c1b59129f5b81279c7e0a82" + } + }, + "0.4.34": { + "x86_64_linux_musl": { + "checksum": "b7bd211f0f6c703b9d82e11c96e6679e21989523c85349f243f385159ff0af39" + }, + "x86_64_macos": { + "checksum": "ffd0a1834eff980a10d2d983db167d67300a0634ef405fb6153f98072eae1bf4" + } + } +} diff --git a/tools/codegen/base/cargo-dinghy.json b/tools/codegen/base/cargo-dinghy.json new file mode 100644 index 000000000..85898b12e --- /dev/null +++ b/tools/codegen/base/cargo-dinghy.json @@ -0,0 +1,10 @@ +{ + "repository": "https://github.com/sonos/dinghy", + "tag_prefix": "", + "asset_name": "${package}-${os_name}-${version}.tgz", + "bin": "${package}-${version}/${package}${exe}", + "platform": { + "x86_64_linux_musl": {}, + "x86_64_macos": {} + } +} diff --git a/tools/codegen/src/main.rs b/tools/codegen/src/main.rs index c434ad86c..3ea4c4c72 100644 --- a/tools/codegen/src/main.rs +++ b/tools/codegen/src/main.rs @@ -203,7 +203,7 @@ fn main() -> Result<()> { fs::File::open(download_cache)?.read_to_end(&mut buf)?; } else { download(&url)?.into_reader().read_to_end(&mut buf)?; - eprintln!(" downloaded complete"); + eprintln!(" download complete"); fs::write(download_cache, &buf)?; } eprintln!("getting sha256 hash for {url}"); @@ -377,6 +377,7 @@ fn replace_vars(s: &str, package: &str, version: &str, platform: HostPlatform) - .replace("${package}", package) .replace("${tool}", package) .replace("${rust_target}", platform.rust_target()) + .replace("${os_name}", platform.os_name()) .replace("${version}", version) .replace("${exe}", platform.exe_suffix()); if s.contains('$') { @@ -698,6 +699,16 @@ impl HostPlatform { Self::aarch64_windows => "aarch64-pc-windows-msvc", } } + fn os_name(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",