Files
wlan-cloud-rrm/scripts/get_build_version.sh
2022-08-18 11:47:42 -07:00

9 lines
258 B
Bash
Executable File

#!/bin/sh
# Print the "build version" to be appended to the package version
if [ -d .git ] && [ -x "$(command -v git)" ]; then
BUILD_NUM="$(git rev-list --count --first-parent HEAD)"
HASH="$(git rev-parse --short HEAD)"
echo " - $HASH($BUILD_NUM)"
fi