Commit 268b3a53 by Vincent Pelletier

shell: Add --version support.

1 parent a9e2c64f
caucase/_version.py export-subst
shell/caucase.sh export-subst
......@@ -749,7 +749,7 @@ EOF
status arg argc \
ca_netloc ca_address ca_port ca_path \
csr_id csr csr_path crl crt crt_path crt_dir key_path key serial \
csr_list_json
csr_list_json version
while test $# -gt 0; do
arg="$1"
......@@ -760,6 +760,19 @@ EOF
_usage
return
;;
--version)
# shellcheck disable=SC2016
version='$Format:%H$'
if [ "x$(echo "$version" | base64)" = 'xJEZvcm1hdDolSCQK' ]; then
if command -v git > /dev/null; then
version="$(git describe --tags --dirty --always --long)"
else
version='unknown'
fi
fi
printf '%s\n' "$version"
return
;;
--ca-url)
_needArg 1 || return 1
ca_anon_url="$1"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!