mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-12 06:40:41 +08:00
10 lines
229 B
Bash
Executable File
10 lines
229 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if ! version="$(git describe --match='v*' --candidates=1 2>/dev/null)"; then
|
|
echo "fatal: no version tag found by 'git describe'" >&2 ; exit 1
|
|
fi
|
|
# Remove `v` prefix from version.
|
|
version=${version#v}
|
|
|
|
echo $version
|