resolc 0.4.1

Solidity frontend for the revive compiler
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    match git2::Repository::open("../..") {
        Ok(repo) => {
            let head = repo.head().expect("should have head");
            let commit = head.peel_to_commit().expect("should have commit");
            let id = &commit.id().to_string()[..7];
            println!("cargo:rustc-env=GIT_COMMIT_HASH={id}");
        }
        Err(_) => println!("cargo:rustc-env=GIT_COMMIT_HASH=unknown"),
    };
}