1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh set -x set -e dir="$1" out="$2" version=$(git -C "$dir" describe --abbrev=8 --always)-soong echo "#define ANDROID_BUILD_VERSION \"${version}\"" > "$out"