-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow - fix hemtt lint, drop sqflint, fix ext clippy warnings (#10219
- Loading branch information
1 parent
b72ce61
commit 1b210d8
Showing
5 changed files
with
17 additions
and
20 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
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,10 +1,13 @@ | ||
fn main() { | ||
let repo = git2::Repository::open("../").expect("Open git repo"); | ||
let head = repo | ||
.head() | ||
.expect("Get HEAD") | ||
.target() | ||
.expect("Get HEAD target"); | ||
let commit = repo.find_commit(head).expect("Find commit"); | ||
println!("cargo:rustc-env=GIT_HASH={}", commit.id()); | ||
if let Ok(repo) = git2::Repository::open("../") { | ||
let head = repo | ||
.head() | ||
.expect("Get HEAD") | ||
.target() | ||
.expect("Get HEAD target"); | ||
let commit = repo.find_commit(head).expect("Find commit"); | ||
println!("cargo:rustc-env=GIT_HASH={}", commit.id()); | ||
} else { | ||
println!("cargo:rustc-env=GIT_HASH=GIT_REPO_FAILURE"); | ||
} | ||
} |
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