-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add sha256sum and version.txt (#599)
* ci: add sha256sum and version.txt * ci: improve git tag * build: change alpha release version format * ci(docker): build docker images when nightly relase, but not push it * ci: change nightly version format * ci: add RISC-V * ci: remove RISC-V * refactor: add package name to cli -v * fix
- Loading branch information
Showing
3 changed files
with
93 additions
and
49 deletions.
There are no files selected for viewing
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,14 @@ | ||
#![feature(let_chains)] | ||
fn main() { | ||
println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION"); | ||
let version = if let Some("refs/heads/master") = option_env!("GITHUB_REF") | ||
&& let Some(sha) = option_env!("GITHUB_SHA") | ||
{ | ||
let short_sha = &sha[..7]; | ||
// Nightly relase below | ||
format!("{}-alpha+sha.{short_sha}", env!("CARGO_PKG_VERSION")) | ||
} else { | ||
env!("CARGO_PKG_VERSION").into() | ||
}; | ||
println!("cargo:rustc-env=CLASH_VERSION_OVERRIDE={version}"); | ||
} |
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