chore: change dev version format to <latest_tag>-dev+<current_sha>
This commit is contained in:
parent
0a6ed33d96
commit
bc5e92474e
|
@ -15,7 +15,9 @@ typeset -r version_file="VERSION"
|
|||
if [[ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" == "true" ]]; then
|
||||
tag=$(git tag --points-at HEAD | tee "$version_file" || error "could not extract tag")
|
||||
if [[ -z "$tag" ]]; then
|
||||
git rev-parse --short HEAD > "$version_file" || error "could not extract commit sha"
|
||||
latest_tag=$(git describe --abbrev=0 --tags || error "could not extract latest tag")
|
||||
latest_commit=$(git rev-parse --short HEAD || error "could not extract commit sha")
|
||||
echo "$latest_tag-dev+$latest_commit" > "$version_file"
|
||||
fi
|
||||
else
|
||||
if [[ ! -f "$version_file" ]]; then
|
||||
|
|
Loading…
Reference in New Issue