mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-02 20:10:37 +02:00
feat(updater): add plugin (#350)
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
This commit is contained in:
co-authored by
Fabian-Lars
parent
012d32e8ed
commit
a95fb473a2
@@ -0,0 +1,14 @@
|
||||
fn main() {
|
||||
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
let mobile = target_os == "ios" || target_os == "android";
|
||||
alias("desktop", !mobile);
|
||||
alias("mobile", mobile);
|
||||
}
|
||||
|
||||
// creates a cfg alias if `has_feature` is true.
|
||||
// `alias` must be a snake case string.
|
||||
fn alias(alias: &str, has_feature: bool) {
|
||||
if has_feature {
|
||||
println!("cargo:rustc-cfg={alias}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user