File: .version.sh

package info (click to toggle)
golang-github-smallstep-cli 0.15.16%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,404 kB
  • sloc: sh: 512; makefile: 99
file content (7 lines) | stat: -rwxr-xr-x 197 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
#!/usr/bin/env bash
read -r firstline < .VERSION
last_half="${firstline##*tag: }"
if [[ ${last_half::1} == "v" ]]; then
    version_string="${last_half%%[,)]*}"
fi
echo "${version_string:-v0.0.0}"