Skip to content

Commit c32085c

Browse files
authored
chore(scripts): handle Sapling in version.sh (#8687)
1 parent 6929792 commit c32085c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/version.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ set -euo pipefail
1515
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
1616
cdroot
1717

18+
# If in Sapling, just print the commit since we don't have tags.
19+
if [ -d ".sl" ]; then
20+
sl log -l 1 | awk '/changeset/ { print substr($2, 0, 16) }'
21+
exit 0
22+
fi
23+
1824
if [[ "${CODER_FORCE_VERSION:-}" != "" ]]; then
1925
echo "$CODER_FORCE_VERSION"
2026
exit 0

0 commit comments

Comments
 (0)