Skip to content

akm/gitguard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gitguard

Concept

gitguard supports to avoid mix of code written by human and code generated by program.

Installation

To install cli, simply run:

go get github.com/akm/gitguard

Make sure your PATH includes the $GOPATH/bin directory so your commands can be easily used:

export PATH=$PATH:$GOPATH/bin

Usage

Run your command after gitguard.

If the workspace is clean, your command will be run. If not, your command won't be run and show messages like this:

$ gitguard foo bar baz
[gitguard] There are files that need to be committed first.
[gitguard] git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   gitguard.go

How to biuld

At first, install gom.

go get github.com/mattn/gom

Build for current platform

gom build

Release

$ rm -rf pkg/
$ mkdir -p pkg/
$ vendor/bin/gox -output="pkg/{{.Dir}}_{{.OS}}_{{.Arch}}"
$ export VERSION=[v0.0.1]
$ vendor/bin/ghr $VERSION pkg/
$ git tag $VERSION
$ git push origin --tags

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages