Skip to content

Commit

Permalink
fix: correct the method used to obtain the version tag to focus on th…
Browse files Browse the repository at this point in the history
…e current branch not across all branches
  • Loading branch information
wintermi committed Apr 9, 2024
1 parent 168a05a commit e1a7c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ OPTIONS:
function _zap_version() {
local -Ar color=(BLUE "\033[0;34m" GREEN "\033[0;32m" RESET "\033[0m")
local _branch=$(git -C "$ZAP_DIR" branch --show-current)
local _version=$(git -C "$ZAP_DIR" describe --tags `git -C "$ZAP_DIR" rev-list --tags --max-count=1`)
local _version=$(git -C "$ZAP_DIR" describe --abbrev=0 --tags)
local _commit=$(git -C "$ZAP_DIR" log -1 --pretty="%h (%cr)")
echo "⚡ Zap - Version\n\nVersion: ${color[GREEN]}${_branch}/${_version}${color[RESET]}\nCommit Hash: ${color[BLUE]}${_commit}${color[RESET]}"
}
Expand Down

0 comments on commit e1a7c76

Please sign in to comment.