From bc5e92474e781caf69e7f05e93804ef1f109ddc7 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 21 Apr 2022 19:48:44 +0200 Subject: [PATCH] chore: change dev version format to -dev+ --- tools/version.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/version.sh b/tools/version.sh index e559af385..4d60d732c 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -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