mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-08 14:31:06 +00:00
build(core): use deterministic git rev-parse
The output may differ in shallow vs. full repo. [no changelog]
This commit is contained in:
parent
61ebb19515
commit
2635e4c7fd
@ -177,6 +177,10 @@
|
|||||||
|
|
||||||
#define MP_STATE_PORT MP_STATE_VM
|
#define MP_STATE_PORT MP_STATE_VM
|
||||||
|
|
||||||
|
// by default contains nearest git tag, which may not be present in shallow
|
||||||
|
// repo, breaking reproducibility
|
||||||
|
#define MICROPY_BANNER_NAME_AND_VERSION ""
|
||||||
|
|
||||||
// ============= this ends common config section ===================
|
// ============= this ends common config section ===================
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,6 +217,10 @@ extern const struct _mp_print_t mp_stderr_print;
|
|||||||
|
|
||||||
#define MP_STATE_PORT MP_STATE_VM
|
#define MP_STATE_PORT MP_STATE_VM
|
||||||
|
|
||||||
|
// by default contains nearest git tag, which may not be present in shallow
|
||||||
|
// repo, breaking reproducibility
|
||||||
|
#define MICROPY_BANNER_NAME_AND_VERSION ""
|
||||||
|
|
||||||
// ============= this ends common config section ===================
|
// ============= this ends common config section ===================
|
||||||
|
|
||||||
// For size_t and ssize_t
|
// For size_t and ssize_t
|
||||||
|
@ -33,9 +33,9 @@ def get_git_revision_hash() -> str:
|
|||||||
|
|
||||||
def get_git_revision_short_hash() -> str:
|
def get_git_revision_short_hash() -> str:
|
||||||
return (
|
return (
|
||||||
subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])
|
subprocess.check_output(["git", "rev-parse", "--verify", "HEAD"])
|
||||||
.decode("ascii")
|
.decode("ascii")
|
||||||
.strip()
|
.strip()[:7]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user