mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-30 22:46:36 +00:00
feat: Add more variables for template (#1160)
Fixed #775 - Add dep target-lexicon v0.12.7 - Add `target-{family, arch, libc, vendor}` to `package.metadata.binstall`. For `{universal, universal2}-apple-darwin`, the `target-arch` is set to `universal`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
181b5293e7
commit
d8419ea5a2
10 changed files with 210 additions and 115 deletions
|
@ -9,6 +9,7 @@ use crate::{
|
|||
helpers::{
|
||||
download::{Download, ExtractedFiles},
|
||||
gh_api_client::GhApiClient,
|
||||
is_universal_macos,
|
||||
remote::{does_url_exist, Client, Method},
|
||||
tasks::AutoAbortJoinHandle,
|
||||
},
|
||||
|
@ -20,10 +21,6 @@ use super::{Data, TargetData};
|
|||
const BASE_URL: &str = "https://github.com/cargo-bins/cargo-quickinstall/releases/download";
|
||||
const STATS_URL: &str = "https://warehouse-clerk-tmp.vercel.app/api/crate";
|
||||
|
||||
fn is_universal_macos(target: &str) -> bool {
|
||||
["universal-apple-darwin", "universal2-apple-darwin"].contains(&target)
|
||||
}
|
||||
|
||||
pub struct QuickInstall {
|
||||
client: Client,
|
||||
gh_api_client: GhApiClient,
|
||||
|
@ -136,6 +133,10 @@ by rust officially."#,
|
|||
fn target(&self) -> &str {
|
||||
&self.target_data.target
|
||||
}
|
||||
|
||||
fn target_data(&self) -> &Arc<TargetData> {
|
||||
&self.target_data
|
||||
}
|
||||
}
|
||||
|
||||
impl QuickInstall {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue