resolve-dependency-commitish 214 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/env bash

set -euo pipefail
IFS=$'\n\t'

version_file="${1}"
version="$(cat "${version_file}")"

case "$version" in
  =*)
      echo "${version#"="}"
      ;;
  *)
      echo "v${version}"
      ;;
esac