From 8d5009fee2da9de26fee96bb727c2df318ffce42 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 20 Jul 2026 20:24:23 +0900 Subject: [PATCH] Support d2 --- TOOLS.md | 1 + manifests/d2.json | 61 ++++++++++++++++++++++++++++++++++++++ tools/codegen/base/d2.json | 27 +++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 manifests/d2.json create mode 100644 tools/codegen/base/d2.json diff --git a/TOOLS.md b/TOOLS.md index c3ed216b..89986704 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -58,6 +58,7 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho | [**covgate**](https://github.com/jesse-black/covgate) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/jesse-black/covgate/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/jesse-black/covgate/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) | | +| [**d2**](https://github.com/terrastruct/d2) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/terrastruct/d2/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/terrastruct/d2/blob/master/LICENSE.txt) | | | [**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) | | | [**docgarden**](https://github.com/jesse-black/docgarden) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/jesse-black/docgarden/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/jesse-black/docgarden/blob/main/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) | | diff --git a/manifests/d2.json b/manifests/d2.json new file mode 100644 index 00000000..465d5520 --- /dev/null +++ b/manifests/d2.json @@ -0,0 +1,61 @@ +{ + "rust_crate": null, + "template": { + "x86_64_linux_musl": { + "url": "https://github.com/terrastruct/d2/releases/download/v${version}/d2-v${version}-linux-amd64.tar.gz", + "bin": "d2-v${version}/bin/d2" + }, + "x86_64_macos": { + "url": "https://github.com/terrastruct/d2/releases/download/v${version}/d2-v${version}-macos-amd64.tar.gz", + "bin": "d2-v${version}/bin/d2" + }, + "x86_64_windows": { + "url": "https://github.com/terrastruct/d2/releases/download/v${version}/d2-v${version}-windows-amd64.tar.gz", + "bin": "d2-v${version}/bin/d2.exe" + }, + "aarch64_linux_musl": { + "url": "https://github.com/terrastruct/d2/releases/download/v${version}/d2-v${version}-linux-arm64.tar.gz", + "bin": "d2-v${version}/bin/d2" + }, + "aarch64_macos": { + "url": "https://github.com/terrastruct/d2/releases/download/v${version}/d2-v${version}-macos-arm64.tar.gz", + "bin": "d2-v${version}/bin/d2" + }, + "aarch64_windows": { + "url": "https://github.com/terrastruct/d2/releases/download/v${version}/d2-v${version}-windows-arm64.tar.gz", + "bin": "d2-v${version}/bin/d2.exe" + } + }, + "latest": { + "version": "0.7.1" + }, + "0.7": { + "version": "0.7.1" + }, + "0.7.1": { + "x86_64_linux_musl": { + "etag": "0x8DDDF1728E4DD4A", + "hash": "eb172adf59f38d1e5a70ab177591356754ffaf9bebb84e0ca8b767dfb421dad7" + }, + "x86_64_macos": { + "etag": "0x8DDDF170F26D8B8", + "hash": "b0178e8fdae72194d5a23aa6effd323378cc58ccd3b08d175ab80371c14e106f" + }, + "x86_64_windows": { + "etag": "0x8DDDF17125BFAEC", + "hash": "d289c2866221c618c9fc6efcd416ee8c16e122bd0100761aea51001e3c958f57" + }, + "aarch64_linux_musl": { + "etag": "0x8DDDF17039F867F", + "hash": "ce3a0b985a8f91335a826c254b3a88736fd81afcdd08b58f6c749d2add6864b0" + }, + "aarch64_macos": { + "etag": "0x8DDDF1729CAB84F", + "hash": "80de85f3b0ac7d9569acac0780ed65dd994ea78969b6b230c58bbb2c6113465b" + }, + "aarch64_windows": { + "etag": "0x8DDDF1704EDE5E6", + "hash": "c7ebdc7b2f6df513b715d431762105386f7c702b0b2dddff2a500a032b1bba67" + } + } +} diff --git a/tools/codegen/base/d2.json b/tools/codegen/base/d2.json new file mode 100644 index 00000000..9027029e --- /dev/null +++ b/tools/codegen/base/d2.json @@ -0,0 +1,27 @@ +{ + "repository": "https://github.com/terrastruct/d2", + "license_markdown": "[MPL-2.0](https://github.com/terrastruct/d2/blob/master/LICENSE.txt)", + "tag_prefix": "v", + "version_range": ">= 0.7.1", + "bin": "${package}-v${version}/bin/${package}${exe}", + "platform": { + "x86_64_linux_musl": { + "asset_name": "${package}-v${version}-linux-amd64.tar.gz" + }, + "x86_64_macos": { + "asset_name": "${package}-v${version}-macos-amd64.tar.gz" + }, + "x86_64_windows": { + "asset_name": "${package}-v${version}-windows-amd64.tar.gz" + }, + "aarch64_linux_musl": { + "asset_name": "${package}-v${version}-linux-arm64.tar.gz" + }, + "aarch64_macos": { + "asset_name": "${package}-v${version}-macos-arm64.tar.gz" + }, + "aarch64_windows": { + "asset_name": "${package}-v${version}-windows-arm64.tar.gz" + } + } +}