Skip to content

Commit 96e215e

Browse files
authored
fix: select recommended version by semver regex
1 parent 6211ac2 commit 96e215e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ generate_env_file() {
5050
if installed_from_archive; then
5151
version="$(cat "../${VERSION_FILE}")"
5252
else
53-
version="$(git describe --exact-match --tags HEAD)"
53+
version="$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)"
5454
fi
5555

5656
cat <<EOF > "${ENV_FILE}"

0 commit comments

Comments
 (0)