Skip to content

Commit 635f643

Browse files
committed
Update gen-license-urls
1 parent 6890e23 commit 635f643

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

xtask/src/main.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ fn gen_license_urls(ArgsGenLicenseUrls {}: ArgsGenLicenseUrls) -> eyre::Result<(
105105
} = packages[&(&**name, version)];
106106
let manifest_dir = manifest_path.parent().unwrap();
107107

108-
// proconio, nalgebra, bitset-fixedだけ暫定対応
108+
// 一部のクレートは暫定対応
109109
if name == "proconio" {
110110
let sha1 = read_git_sha1(manifest_dir)?;
111111
return Ok((
@@ -120,16 +120,18 @@ fn gen_license_urls(ArgsGenLicenseUrls {}: ArgsGenLicenseUrls) -> eyre::Result<(
120120
format!("https://docs.rs/crate/nalgebra/{version}/source/Cargo.toml.orig"),
121121
));
122122
}
123-
if name == "bitset-fixed" {
123+
if ["argio", "counter", "pathfinding", "bitset-fixed"].contains(&&**name) {
124124
return Ok((
125-
"bitset-fixed",
126-
format!("https://docs.rs/crate/bitset-fixed/{version}/source/Cargo.toml.orig"),
125+
name,
126+
format!("https://docs.rs/crate/{name}/{version}/source/Cargo.toml.orig"),
127127
));
128128
}
129129

130130
let url = format!("https://docs.rs/crate/{name}/{version}/source/");
131131
let url = if manifest_dir.join("LICENSE").exists() {
132132
format!("{url}LICENSE")
133+
} else if manifest_dir.join("LICENSE.txt").exists() {
134+
format!("{url}LICENSE.txt")
133135
} else {
134136
url
135137
};

0 commit comments

Comments
 (0)