rip out tauri bundle (v2), swc -> esbuild, blacksmith -> warpbuild, FAST CI 🚀 (#5328)
- inline mac, windows, linux bundling in the cli - remove tauri bundle from our dep tree - trim down the rpm crate for fewer dependencies in tree - migrate from blacksmith to warpbuild - move off swc and instead use esbuild via tool - use dev drives in windows CI - use fork of nix action for faster caching - test bundling in CI - fix asset handling in linux - add default APPDATA location for webview2 installs for dioxus apps on windows
This commit is contained in:
1 parent
be7296f4f0
commit
b2d01e6779
83 files changed
+7756
-5403
No files matched your search
+40
-1
@@ -1,3 +1,42 @@
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
built::write_built_file().expect("Failed to acquire build-time information");
|
||||
println!("cargo:rerun-if-env-changed=DIOXUS_CLI_GIT_SHA");
|
||||
println!("cargo:rerun-if-env-changed=DIOXUS_CLI_GIT_SHA_SHORT");
|
||||
println!("cargo:rerun-if-changed=.git/HEAD");
|
||||
println!("cargo:rerun-if-changed=.git/refs");
|
||||
|
||||
let full_hash = std::env::var("DIOXUS_CLI_GIT_SHA")
|
||||
.ok()
|
||||
.or_else(resolve_git_commit_hash);
|
||||
|
||||
if let Some(full_hash) = full_hash {
|
||||
println!("cargo:rustc-env=DIOXUS_CLI_GIT_SHA={full_hash}");
|
||||
|
||||
let short_hash = std::env::var("DIOXUS_CLI_GIT_SHA_SHORT")
|
||||
.ok()
|
||||
.unwrap_or_else(|| full_hash.chars().take(7).collect());
|
||||
|
||||
println!("cargo:rustc-env=DIOXUS_CLI_GIT_SHA_SHORT={short_hash}");
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve_git_commit_hash() -> Option<String> {
|
||||
let output = Command::new("git")
|
||||
.args(["rev-parse", "HEAD"])
|
||||
.output()
|
||||
.ok()?;
|
||||
|
||||
if !output.status.success() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let hash = String::from_utf8(output.stdout).ok()?;
|
||||
let hash = hash.trim().to_string();
|
||||
|
||||
if hash.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(hash)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user