mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-11 07:00:25 +00:00
codegen: Exclude versions not released on crates.io from candidate for "latest"
This commit is contained in:
@@ -16,7 +16,9 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
- Update `release-plz@latest` to 0.3.130.
|
- Update `release-plz@latest` to 0.3.130.
|
||||||
|
|
||||||
- Update `cargo-lambda@latest` to 1.8.2.
|
- Update `cargo-lambda@latest` to 1.8.1.
|
||||||
|
|
||||||
|
- Downgrade `cargo-spellcheck@latest` to 0.15.1. ([#932](https://github.com/taiki-e/install-action/pull/932))
|
||||||
|
|
||||||
## [2.49.43] - 2025-04-01
|
## [2.49.43] - 2025-04-01
|
||||||
|
|
||||||
|
|||||||
6
manifests/cargo-lambda.json
generated
6
manifests/cargo-lambda.json
generated
@@ -20,13 +20,13 @@
|
|||||||
},
|
},
|
||||||
"license_markdown": "[MIT](https://github.com/cargo-lambda/cargo-lambda/blob/main/LICENSE)",
|
"license_markdown": "[MIT](https://github.com/cargo-lambda/cargo-lambda/blob/main/LICENSE)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "1.8.2"
|
"version": "1.8.1"
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"version": "1.8.2"
|
"version": "1.8.1"
|
||||||
},
|
},
|
||||||
"1.8": {
|
"1.8": {
|
||||||
"version": "1.8.2"
|
"version": "1.8.1"
|
||||||
},
|
},
|
||||||
"1.8.2": {
|
"1.8.2": {
|
||||||
"x86_64_linux_musl": {
|
"x86_64_linux_musl": {
|
||||||
|
|||||||
4
manifests/cargo-spellcheck.json
generated
4
manifests/cargo-spellcheck.json
generated
@@ -10,10 +10,10 @@
|
|||||||
},
|
},
|
||||||
"license_markdown": "[LGPLv2.1](https://github.com/drahnr/cargo-spellcheck/blob/master/LICENSE-LGPL)",
|
"license_markdown": "[LGPLv2.1](https://github.com/drahnr/cargo-spellcheck/blob/master/LICENSE-LGPL)",
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.15.2"
|
"version": "0.15.1"
|
||||||
},
|
},
|
||||||
"0.15": {
|
"0.15": {
|
||||||
"version": "0.15.2"
|
"version": "0.15.1"
|
||||||
},
|
},
|
||||||
"0.15.2": {
|
"0.15.2": {
|
||||||
"x86_64_linux_gnu": {
|
"x86_64_linux_gnu": {
|
||||||
|
|||||||
2
manifests/wasmtime.json
generated
2
manifests/wasmtime.json
generated
@@ -2775,7 +2775,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"0.22": {
|
"0.22": {
|
||||||
"version": "0.22.1"
|
"version": "0.22.0"
|
||||||
},
|
},
|
||||||
"0.22.1": {
|
"0.22.1": {
|
||||||
"x86_64_linux_gnu": {
|
"x86_64_linux_gnu": {
|
||||||
|
|||||||
2
manifests/zola.json
generated
2
manifests/zola.json
generated
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"rust_crate": "zola",
|
"rust_crate": null,
|
||||||
"template": {
|
"template": {
|
||||||
"x86_64_linux_gnu": {
|
"x86_64_linux_gnu": {
|
||||||
"url": "https://github.com/getzola/zola/releases/download/v${version}/zola-v${version}-x86_64-unknown-linux-gnu.tar.gz"
|
"url": "https://github.com/getzola/zola/releases/download/v${version}/zola-v${version}-x86_64-unknown-linux-gnu.tar.gz"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"repository": "https://github.com/getzola/zola",
|
"repository": "https://github.com/getzola/zola",
|
||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
|
||||||
"asset_name": "${package}-v${version}-${rust_target}.tar.gz",
|
"asset_name": "${package}-v${version}-${rust_target}.tar.gz",
|
||||||
"platform": {
|
"platform": {
|
||||||
"x86_64_linux_gnu": {},
|
"x86_64_linux_gnu": {},
|
||||||
|
|||||||
@@ -490,12 +490,14 @@ fn main() -> Result<()> {
|
|||||||
if let Some(crates_io_info) = &crates_io_info {
|
if let Some(crates_io_info) = &crates_io_info {
|
||||||
if let Some(v) = crates_io_info.versions.iter().find(|v| v.num == *version) {
|
if let Some(v) = crates_io_info.versions.iter().find(|v| v.num == *version) {
|
||||||
if v.yanked {
|
if v.yanked {
|
||||||
continue;
|
continue; // Exclude yanked version from candidate for "latest".
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
continue; // Exclude version not released on crates.io from candidate for "latest".
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if base_info.broken.contains(version) {
|
if base_info.broken.contains(version) {
|
||||||
continue;
|
continue; // Exclude version marked as broken from candidate for "latest".
|
||||||
}
|
}
|
||||||
if !(version.major == 0 && version.minor == 0) {
|
if !(version.major == 0 && version.minor == 0) {
|
||||||
manifests.map.insert(
|
manifests.map.insert(
|
||||||
@@ -618,15 +620,17 @@ fn replace_vars(
|
|||||||
platform: Option<HostPlatform>,
|
platform: Option<HostPlatform>,
|
||||||
rust_crate: Option<&str>,
|
rust_crate: Option<&str>,
|
||||||
) -> Result<String> {
|
) -> Result<String> {
|
||||||
const RUST_SPECIFIC: &[(&str, fn(HostPlatform) -> &'static str)] = &[
|
static RUST_SPECIFIC: &[(&str, fn(HostPlatform) -> &'static str)] = &[
|
||||||
("${rust_target}", HostPlatform::rust_target),
|
("${rust_target}", HostPlatform::rust_target),
|
||||||
("${rust_target_arch}", HostPlatform::rust_target_arch),
|
("${rust_target_arch}", HostPlatform::rust_target_arch),
|
||||||
("${rust_target_os}", HostPlatform::rust_target_os),
|
("${rust_target_os}", HostPlatform::rust_target_os),
|
||||||
];
|
];
|
||||||
|
// zola is Rust crate, but is not released on crates.io.
|
||||||
|
static KNOWN_RUST_CRATE_NOT_IN_CRATES_IO: &[&str] = &["zola"];
|
||||||
let mut s = s.replace("${package}", package).replace("${tool}", package);
|
let mut s = s.replace("${package}", package).replace("${tool}", package);
|
||||||
if let Some(platform) = platform {
|
if let Some(platform) = platform {
|
||||||
s = s.replace("${exe}", platform.exe_suffix());
|
s = s.replace("${exe}", platform.exe_suffix());
|
||||||
if rust_crate.is_some() {
|
if rust_crate.is_some() || KNOWN_RUST_CRATE_NOT_IN_CRATES_IO.contains(&package) {
|
||||||
for &(var, f) in RUST_SPECIFIC {
|
for &(var, f) in RUST_SPECIFIC {
|
||||||
s = s.replace(var, f(platform));
|
s = s.replace(var, f(platform));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user