diff --git a/.github/.cspell/project-dictionary.txt b/.github/.cspell/project-dictionary.txt index 64f33fd5..06865f1e 100644 --- a/.github/.cspell/project-dictionary.txt +++ b/.github/.cspell/project-dictionary.txt @@ -20,6 +20,7 @@ protoc pubkey pwsh quickinstall +rclone rdme sccache syft diff --git a/TOOLS.md b/TOOLS.md index 031947e4..babaa758 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -46,6 +46,7 @@ If a tool not included in the list below is specified, this action uses [cargo-b | [**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) | +| [**rclone**](https://github.com/rclone/rclone) | `/usr/local/bin` | [GitHub Releases](https://github.com/rclone/rclone/releases) | Linux, macOS, Windows | [MIT](https://github.com/rclone/rclone/blob/master/COPYING) | | [**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) | diff --git a/manifests/rclone.json b/manifests/rclone.json new file mode 100644 index 00000000..575409db --- /dev/null +++ b/manifests/rclone.json @@ -0,0 +1,59 @@ +{ + "rust_crate": null, + "template": { + "x86_64_linux_musl": { + "url": "https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}-linux-amd64.zip", + "bin": "rclone-v${version}-linux-amd64/rclone" + }, + "x86_64_macos": { + "url": "https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}-osx-amd64.zip", + "bin": "rclone-v${version}-osx-amd64/rclone" + }, + "x86_64_windows": { + "url": "https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}-windows-amd64.zip", + "bin": "rclone-v${version}-windows-amd64/rclone.exe" + }, + "aarch64_linux_musl": { + "url": "https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}-linux-arm64.zip", + "bin": "rclone-v${version}-linux-arm64/rclone" + }, + "aarch64_macos": { + "url": "https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}-osx-arm64.zip", + "bin": "rclone-v${version}-osx-arm64/rclone" + }, + "aarch64_windows": { + "url": "https://github.com/rclone/rclone/releases/download/v${version}/rclone-v${version}-windows-arm64.zip", + "bin": "rclone-v${version}-windows-arm64/rclone.exe" + } + }, + "license_markdown": "[MIT](https://github.com/rclone/rclone/blob/master/COPYING)", + "latest": { + "version": "1.66.0" + }, + "1": { + "version": "1.66.0" + }, + "1.66": { + "version": "1.66.0" + }, + "1.66.0": { + "x86_64_linux_musl": { + "checksum": "b4d304b1dc76001b1d3bb820ae8d1ae60a072afbd3296be904a3ee00b3d4fab9" + }, + "x86_64_macos": { + "checksum": "5adb4c5fe0675627461000a63156001301ec7cade966c55c8c4ebcfaeb62c5ae" + }, + "x86_64_windows": { + "checksum": "8e8bb13fb0d7beb316487ecde8ead5426784cdcdbf8b4d8dd381c6fe8c7d92a0" + }, + "aarch64_linux_musl": { + "checksum": "c50a3ab93082f21788f9244393b19f2426edeeb896eec2e3e05ffb2e8727e075" + }, + "aarch64_macos": { + "checksum": "b5f4c4d06ff3d426aee99870ad437276c9ddaad55442f2df6a58b918115fe4cf" + }, + "aarch64_windows": { + "checksum": "4e815350382249ffb6d9520262bbce81f45f63126134a0c365eb648a4d27e6ea" + } + } +} diff --git a/tools/codegen/base/rclone.json b/tools/codegen/base/rclone.json new file mode 100644 index 00000000..562272c3 --- /dev/null +++ b/tools/codegen/base/rclone.json @@ -0,0 +1,31 @@ +{ + "repository": "https://github.com/rclone/rclone", + "tag_prefix": "v", + "version_range": ">= 1.66.0", + "platform": { + "x86_64_linux_musl": { + "asset_name": "${package}-v${version}-linux-amd64.zip", + "bin": "${package}-v${version}-linux-amd64/${package}" + }, + "x86_64_macos": { + "asset_name": "${package}-v${version}-osx-amd64.zip", + "bin": "${package}-v${version}-osx-amd64/${package}" + }, + "x86_64_windows": { + "asset_name": "${package}-v${version}-windows-amd64.zip", + "bin": "${package}-v${version}-windows-amd64/${package}${exe}" + }, + "aarch64_linux_musl": { + "asset_name": "${package}-v${version}-linux-arm64.zip", + "bin": "${package}-v${version}-linux-arm64/${package}" + }, + "aarch64_macos": { + "asset_name": "${package}-v${version}-osx-arm64.zip", + "bin": "${package}-v${version}-osx-arm64/${package}" + }, + "aarch64_windows": { + "asset_name": "${package}-v${version}-windows-arm64.zip", + "bin": "${package}-v${version}-windows-arm64/${package}${exe}" + } + } +} diff --git a/tools/codegen/src/main.rs b/tools/codegen/src/main.rs index 66d58495..d5ee7940 100644 --- a/tools/codegen/src/main.rs +++ b/tools/codegen/src/main.rs @@ -36,6 +36,8 @@ fn main() -> Result<()> { fs::create_dir_all(manifest_path.parent().unwrap())?; fs::create_dir_all(download_cache_dir)?; + eprintln!("download cache: {}", download_cache_dir.display()); + let mut base_info: BaseManifest = serde_json::from_slice(&fs::read( workspace_root.join("tools/codegen/base").join(format!("{package}.json")), )?)?; @@ -722,9 +724,12 @@ fn get_license_markdown(spdx_expr: &str, repo: &String, default_branch: &String) license_id.name.to_string() }; let name = license_id.name.split('-').next().unwrap().to_ascii_uppercase(); - for filename in - ["LICENSE".to_string(), format!("LICENSE-{name}"), "LICENSE.md".to_string()] - { + for filename in [ + "LICENSE".to_string(), + format!("LICENSE-{name}"), + "LICENSE.md".to_string(), + "COPYING".to_string(), + ] { let url = create_github_raw_link(repo, default_branch, &filename); if github_head(&url).is_ok() { let url = create_github_link(repo, default_branch, &filename);