diff --git a/common/.config/lazygit/config.yml b/common/.config/lazygit/config.yml index 4cc1816b..54efedf9 100644 --- a/common/.config/lazygit/config.yml +++ b/common/.config/lazygit/config.yml @@ -55,7 +55,13 @@ customCommands: description: "prune local branches that have been merged to main/master" - key: "<c-t>" context: "global" - command: "tag=$(date +%Y).$(date +%m | sed 's/^0//').$(($(git tag --sort=-v:refname | grep ^$MAJOR.$MINOR | head -n 1 | cut -d . -f 3) + 1)); git tag -m '' $tag; git push {{ .SelectedRemote.Name }} $tag;" + command: | + major=$(date +%Y) + minor=$(date +%m | sed 's/^0//') + patch=$(($(git tag --sort=-v:refname | grep ^$major\.$minor | head -n 1 | cut -d . -f 3) + 1)) + tag="${major}.${minor}.${patch}" + git tag -m '' "$tag" + git push {{ .SelectedRemote.Name }} "$tag" description: "Create and push a tag based off the date" loadingText: "Tagging/Pushing..." - key: "<c-v>"