chore(scripts): handle Sapling in version.sh (#8687)

This commit is contained in:
Ammar Bandukwala
2023-07-24 11:11:46 -05:00
committed by GitHub
parent 6929792a58
commit c32085ca10

View File

@ -15,6 +15,12 @@ set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
cdroot
# If in Sapling, just print the commit since we don't have tags.
if [ -d ".sl" ]; then
sl log -l 1 | awk '/changeset/ { print substr($2, 0, 16) }'
exit 0
fi
if [[ "${CODER_FORCE_VERSION:-}" != "" ]]; then
echo "$CODER_FORCE_VERSION"
exit 0