mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-03 05:29:29 +00:00
With longer git SHA1s reported by git commands and longer version strings, the entire SHA1 could be not fitting into the 32 byte version of the VERSION string. So, instead of adding the 'dirty' marker to the end of SHA1 let's replace the prefix dash with it in case the tree is dirty. This way the length of the version string does not change (as long as the 'dirty' marker is one character long). BRANCH=cr50 BUG=b:64698702 TEST=verified output of running getversion.sh with a clean tree $ ./util/getversion.sh | grep VERSION32 #define CROS_EC_VERSION32 "_v1.1.7046-591608e2e" and a 'dirty' tree $ ./util/getversion.sh | grep VERSION32 #define CROS_EC_VERSION32 "_v1.1.7046+591608e2e" Change-Id: I42684522beaff9e9714206cfaddaf97e6cd644be Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/665958 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
4.0 KiB
Executable File
4.0 KiB
Executable File