Add rclone (#511)

* Add rclone

* fix cspell

* specify bin dir
This commit is contained in:
John Vandenberg
2024-06-08 14:07:49 +08:00
committed by GitHub
parent 16647abe1b
commit 66c4dcc03d
5 changed files with 100 additions and 3 deletions

View File

@@ -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);