2021-01-23 14:15:22 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -uo pipefail
|
|
|
|
|
2021-06-23 13:14:49 +00:00
|
|
|
version="0.1.6"
|
2021-01-23 14:15:22 +00:00
|
|
|
git_revision=""
|
|
|
|
|
|
|
|
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q dctlenv; then
|
|
|
|
git_revision="$(git describe --tags HEAD 2>/dev/null || true)"
|
|
|
|
git_revision="${git_revision#v}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "dctlenv ${git_revision:-$version}"
|