From 43b4f86485ce51e5f0d091650da012992f9eba64 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 16 Jan 2022 13:18:21 +1100 Subject: [PATCH] waf: use GIT_VERSION from env if available This allows for reproducible builds to be produced --- Tools/ardupilotwaf/chibios.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/ardupilotwaf/chibios.py b/Tools/ardupilotwaf/chibios.py index 1885b76806..b117012ffb 100644 --- a/Tools/ardupilotwaf/chibios.py +++ b/Tools/ardupilotwaf/chibios.py @@ -205,7 +205,7 @@ class set_app_descriptor(Task.Task): desc_len = 16 crc1 = to_unsigned(crc32(bytearray(img[:offset]))) crc2 = to_unsigned(crc32(bytearray(img[offset+desc_len:]))) - githash = to_unsigned(int('0x' + self.generator.bld.git_head_hash(short=True),16)) + githash = to_unsigned(int('0x' + os.environ.get('GIT_VERSION', self.generator.bld.git_head_hash(short=True)),16)) desc = struct.pack('