mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-11 15:10:24 +00: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]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Fix `cargo-spellcheck` installation bug. ([#428](https://github.com/taiki-e/install-action/pull/428))
|
||||||
|
|
||||||
## [2.31.1] - 2024-03-28
|
## [2.31.1] - 2024-03-28
|
||||||
|
|
||||||
- Update `protoc@latest` to 3.26.1.
|
- 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",
|
"rust_crate": "cargo-spellcheck",
|
||||||
"template": {
|
"template": {
|
||||||
"x86_64_linux_gnu": {
|
"x86_64_linux_gnu": {
|
||||||
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/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"
|
||||||
"bin": "cargo-spellcheck-v${version}-x86_64-unknown-linux-gnu"
|
|
||||||
},
|
},
|
||||||
"x86_64_windows": {
|
"x86_64_windows": {
|
||||||
"url": "https://github.com/drahnr/cargo-spellcheck/releases/download/v${version}/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"
|
||||||
"bin": "cargo-spellcheck-v${version}-x86_64-pc-windows-gnu.exe"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latest": {
|
"latest": {
|
||||||
|
|||||||
@@ -3,12 +3,10 @@
|
|||||||
"tag_prefix": "v",
|
"tag_prefix": "v",
|
||||||
"rust_crate": "${package}",
|
"rust_crate": "${package}",
|
||||||
"asset_name": "${package}-v${version}-${rust_target}",
|
"asset_name": "${package}-v${version}-${rust_target}",
|
||||||
"bin": "${package}-v${version}-${rust_target}",
|
|
||||||
"version_range": ">= 0.13",
|
"version_range": ">= 0.13",
|
||||||
"platform": {
|
"platform": {
|
||||||
"x86_64_windows": {
|
"x86_64_windows": {
|
||||||
"asset_name": "${package}-v${version}-x86_64-pc-windows-gnu.exe",
|
"asset_name": "${package}-v${version}-x86_64-pc-windows-gnu.exe"
|
||||||
"bin": "${package}-v${version}-x86_64-pc-windows-gnu.exe"
|
|
||||||
},
|
},
|
||||||
"x86_64_linux_gnu": {}
|
"x86_64_linux_gnu": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -755,12 +755,16 @@ struct BaseManifest {
|
|||||||
}
|
}
|
||||||
impl BaseManifest {
|
impl BaseManifest {
|
||||||
fn validate(&self) {
|
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());
|
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}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
for m in self.platform.values() {
|
|
||||||
if let Some(bin) = &m.bin {
|
|
||||||
assert!(!bin.as_slice().is_empty());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user