Project

gitguard

0.0
No commit activity in last 3 years
No release in over 3 years
Keep commit clear by checking workspace before generate something
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.12
~> 10.0
~> 3.0
 Project Readme

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