-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3215: Update wasmer --version logic, integrate wapm-cli r=Michael-F-Bryan a=fschutt - [x] Update clap - [x] Integrate wapm-cli logic - [x] Polish CLI handling and UX Fixes #3208. Fixes #3189. Co-authored-by: Felix Schütt <[email protected]> Co-authored-by: Felix Schütt <[email protected]>
- Loading branch information
Showing
24 changed files
with
4,333 additions
and
155 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[package] | ||
name = "adamz/qjs" | ||
version = "0.0.1" | ||
description = "https://github.com/bellard/quickjs" | ||
license = "MIT" | ||
|
||
[[command]] | ||
name = "qjs" | ||
module = "qjs" | ||
|
||
[[module]] | ||
name = "qjs" | ||
source = "qjs.wasm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
use chrono::prelude::*; | ||
use std::process::Command; | ||
|
||
pub fn main() { | ||
println!("cargo:rerun-if-changed=build.rs"); | ||
println!("cargo:rerun-if-env-changed=WASMER_INSTALL_PREFIX"); | ||
// Set WASMER_GIT_HASH | ||
let git_hash = Command::new("git") | ||
.args(&["rev-parse", "HEAD"]) | ||
.output() | ||
.ok() | ||
.and_then(|output| String::from_utf8(output.stdout).ok()) | ||
.unwrap_or_default(); | ||
println!("cargo:rustc-env=WASMER_BUILD_GIT_HASH={}", git_hash); | ||
|
||
if git_hash.len() > 5 { | ||
println!( | ||
"cargo:rustc-env=WASMER_BUILD_GIT_HASH_SHORT={}", | ||
&git_hash[..5] | ||
); | ||
} else { | ||
println!("cargo:rustc-env=WASMER_BUILD_GIT_HASH_SHORT=??????"); | ||
} | ||
|
||
let utc: DateTime<Utc> = Utc::now(); | ||
let date = utc.format("%Y-%m-%d").to_string(); | ||
println!("cargo:rustc-env=WASMER_BUILD_DATE={}", date); | ||
} |
Oops, something went wrong.