mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 15:23:57 -04:00
waf: use GIT_VERSION from env if available
This allows for reproducible builds to be produced
This commit is contained in:
parent
2fe709a59c
commit
43b4f86485
@ -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('<IIII', crc1, crc2, len(img), githash)
|
||||
img = img[:offset] + desc + img[offset+desc_len:]
|
||||
Logs.info("Applying %s APP_DESCRIPTOR %08x%08x" % (self.env.APP_DESCRIPTOR, crc1, crc2))
|
||||
|
Loading…
Reference in New Issue
Block a user