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.
This commit is contained in:
leafee98 2023-01-18 10:06:55 -05:00
parent 59f6e2d64b
commit ef5f2d5ff3

View file

@ -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"
}