From ef5f2d5ff3315bf30fc37a8cc38350e9ff9c81a2 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Wed, 18 Jan 2023 10:06:55 -0500 Subject: [PATCH] Fix: change method to get version of dendrite New tag format like helm-dendrite-0.10.9, now instead of get the latest commit and get its version, we us `git --sort=version:refname` to sort tags. --- dendrite/deb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dendrite/deb.sh b/dendrite/deb.sh index b0e03a9..f588ddd 100644 --- a/dendrite/deb.sh +++ b/dendrite/deb.sh @@ -51,7 +51,7 @@ function download() git -C "$REPO_DIR" fetch --all fi - LATEST_TAG=$(git -C "$REPO_DIR" describe --tags $(git -C "$REPO_DIR" rev-list --tags --max-count=1)) + LATEST_TAG=$(git -C "$REPO_DIR" tag --sort=-version:refname --list 'v*' | head -n 1) echo "switching to tag: $LATEST_TAG" git -C "$REPO_DIR" switch --detach "$LATEST_TAG" }