Skip to content

Commit e1a7c76

Browse files
committed
fix: correct the method used to obtain the version tag to focus on the current branch not across all branches
1 parent 168a05a commit e1a7c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zap.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ OPTIONS:
153153
function _zap_version() {
154154
local -Ar color=(BLUE "\033[0;34m" GREEN "\033[0;32m" RESET "\033[0m")
155155
local _branch=$(git -C "$ZAP_DIR" branch --show-current)
156-
local _version=$(git -C "$ZAP_DIR" describe --tags `git -C "$ZAP_DIR" rev-list --tags --max-count=1`)
156+
local _version=$(git -C "$ZAP_DIR" describe --abbrev=0 --tags)
157157
local _commit=$(git -C "$ZAP_DIR" log -1 --pretty="%h (%cr)")
158158
echo "⚡ Zap - Version\n\nVersion: ${color[GREEN]}${_branch}/${_version}${color[RESET]}\nCommit Hash: ${color[BLUE]}${_commit}${color[RESET]}"
159159
}

0 commit comments

Comments
 (0)