mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore(scripts): handle Sapling in version.sh (#8687)
This commit is contained in:
@ -15,6 +15,12 @@ set -euo pipefail
|
|||||||
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
||||||
cdroot
|
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
|
if [[ "${CODER_FORCE_VERSION:-}" != "" ]]; then
|
||||||
echo "$CODER_FORCE_VERSION"
|
echo "$CODER_FORCE_VERSION"
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user