Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(source-scan): git checks, git metadata (#159)
Summary of changes: - `git dirty` check copied to `cargo near build` flow, it produces a warning, unlike the error in `cargo near deploy` flow - added `source_code_git_url` field to reproducible build metadata - `git pushed to remote` check logic reworked - repo is opened and `HEAD` is determined - relative path of contract within repo is determined - `CARGO_NEAR_SOURCE_CODE_SNAPSHOT` (adapted from [cargo::core::SourceId](https://docs.rs/cargo/latest/cargo/core/struct.SourceId.html)) and `CARGO_NEAR_CONTRACT_PATH` are exported into container - [x] github, package in root of a repo: https://github.com/dj8yfo/sample_no_workspace/tree/6c5ae44150ce51349a95e1605ba053c4fe53cf28 - [x] github, package in subpath in repo : https://github.com/dj8yfo/sample_workspace/tree/b2d5580037c84fd4038b467564a9be9e520611de/self-updates/update - [x] github, package in submodule in repo : https://github.com/dj8yfo/sample_workspace_with_submodules/tree/3d87c81517e1e23a5716c300fe4789b1aafc4c6f/self-updates - [x] bitbucket, package in root of a repo: https://bitbucket.org/dj8yfomule/scratch_check_git/src/master/ ![Screenshot_20240503_204916](https://github.com/near/cargo-near/assets/26653921/046dca51-accb-4838-9eb0-5ae531cf4a59)
- Loading branch information