Skip to content

Commit

Permalink
update build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
dark64 committed Jan 11, 2022
1 parent 0ad4bbe commit 97f2b96
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions zokrates_core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ fn main() {
});

let commit = Oid::from_str(LIBSNARK_COMMIT).unwrap();
let commit = repo.find_commit(commit).unwrap();
let head = repo.head().unwrap();

repo.reset(&commit.as_object(), ResetType::Hard, None)
.unwrap();
if commit.ne(&head.target().unwrap()) {
let commit = repo.find_commit(commit).unwrap();
repo.reset(&commit.as_object(), ResetType::Hard, None)
.unwrap();
}

for mut s in repo.submodules().unwrap() {
s.update(true, None).unwrap();
Expand Down

0 comments on commit 97f2b96

Please sign in to comment.