mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-18 20:02:36 +08:00
Fix cargo-spellcheck installation (#428)
This commit is contained in:
@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Fix `cargo-spellcheck` installation bug. ([#428](https://github.com/taiki-e/install-action/pull/428))
|
||||
|
||||
## [2.31.1] - 2024-03-28
|
||||
|
||||
- Update `protoc@latest` to 3.26.1.
|
||||
|
||||
6
manifests/cargo-spellcheck.json
generated
6
manifests/cargo-spellcheck.json
generated
@@ -2,12 +2,10 @@
|
||||
"rust_crate": "cargo-spellcheck",
|
||||
"template": {
|
||||
"x86_64_linux_gnu": {
|
||||
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/cargo-spellcheck-v${version}-x86_64-unknown-linux-gnu",
|
||||
"bin": "cargo-spellcheck-v${version}-x86_64-unknown-linux-gnu"
|
||||
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/cargo-spellcheck-v${version}-x86_64-unknown-linux-gnu"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/cargo-spellcheck-v${version}-x86_64-pc-windows-gnu.exe",
|
||||
"bin": "cargo-spellcheck-v${version}-x86_64-pc-windows-gnu.exe"
|
||||
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/cargo-spellcheck-v${version}-x86_64-pc-windows-gnu.exe"
|
||||
}
|
||||
},
|
||||
"latest": {
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
"tag_prefix": "v",
|
||||
"rust_crate": "${package}",
|
||||
"asset_name": "${package}-v${version}-${rust_target}",
|
||||
"bin": "${package}-v${version}-${rust_target}",
|
||||
"version_range": ">= 0.13",
|
||||
"platform": {
|
||||
"x86_64_windows": {
|
||||
"asset_name": "${package}-v${version}-x86_64-pc-windows-gnu.exe",
|
||||
"bin": "${package}-v${version}-x86_64-pc-windows-gnu.exe"
|
||||
"asset_name": "${package}-v${version}-x86_64-pc-windows-gnu.exe"
|
||||
},
|
||||
"x86_64_linux_gnu": {}
|
||||
}
|
||||
|
||||
@@ -755,12 +755,16 @@ struct BaseManifest {
|
||||
}
|
||||
impl BaseManifest {
|
||||
fn validate(&self) {
|
||||
if let Some(bin) = &self.bin {
|
||||
for bin in self.bin.iter().chain(self.platform.values().flat_map(|m| &m.bin)) {
|
||||
assert!(!bin.as_slice().is_empty());
|
||||
}
|
||||
for m in self.platform.values() {
|
||||
if let Some(bin) = &m.bin {
|
||||
assert!(!bin.as_slice().is_empty());
|
||||
for bin in bin.as_slice() {
|
||||
let file_name = Path::new(bin).file_name().unwrap().to_str().unwrap();
|
||||
if !self.repository.ends_with("/xbuild") {
|
||||
assert!(
|
||||
!(file_name.contains("${version") || file_name.contains("${rust")),
|
||||
"{bin}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user