git-tools

module
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: MIT

README

Git Tools

Go Reference License Build Status Go Report Card

Set of helpful tools to do a routine job.

This tool can help you to work with a bunch of lib/services under your projects. Especially when you start a new project - you need to increment a version of the SDK repo too often. gt allows you to work like git commit -a -m 'some changes' && gt t i min && gt p a. This set of commands reads as "commit changes, increment minor version of last semver tag, push commits to the origin with tags". Pretty simple, huh?

gt try to follow a chosen format of semver tags which you choose (v1.2.3 /1.2.3). If you want to follow a selected pattern, just add gt to your CI system or git-hook and check that all tags have one concrete format. See Usage.

Installation

Golang

go install github.com/kazhuravlev/git-tools/cmd/gt@latest

Homebrew

brew install kazhuravlev/git-tools/git-tools

Docker (zsh) (will work only in current directory)

echo 'alias gt="docker run -it --rm -v `pwd`:/workdir kazhuravlev/gt:latest"' >> ~/.zshrc

Usage

By default, gt works with the repo in the current directory. If you want to specify another path to repo - add --repo=/path/to/repo flag.

gt --repo /path/to/repo tag last
Command Action
t l Show last semver tag in this repo
t i major Find the last semver tag, increment major part and add tag to local repo
t i minor Find the last semver tag, increment minor part and add tag to local repo
t i patch Find the last semver tag, increment patch part and add tag to local repo
lint Run linter, that check the problems.

Directories

Path Synopsis
cmd
gt command
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL