Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew #11

Merged
merged 4 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Gopkg.lock
coverage.out
rrh
vendor
Expand Down
292 changes: 292 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ setup:
go get golang.org/x/tools/cmd/goimports
go get github.com/golang/dep/cmd/dep

go get github.com/mitchellh/cli
go get gopkg.in/src-d/go-git.v4
go get github.com/dustin/go-humanize
go get github.com/posener/complete/gocomplete
go get golang.org/x/tools/cmd/cover
go get github.com/mattn/goveralls

dep ensure -vendor-only

test: update
go test -covermode=count -coverprofile=coverage.out $$(go list ./... | grep -v vendor)
git checkout -- testdata

update: setup
dep ensure
git submodule update --init

build: update test
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Build Status](https://travis-ci.org/tamada/rrh.svg?branch=master)](https://travis-ci.org/tamada/rrh)
[![Coverage Status](https://coveralls.io/repos/github/tamada/rrh/badge.svg?branch=master)](https://coveralls.io/github/tamada/rrh?branch=master)
[![codebeat badge](https://codebeat.co/badges/15e04551-d448-4ad3-be1d-e98b1e586f1a)](https://codebeat.co/projects/github-com-tamada-rrh-master)
[![go report](https://goreportcard.com/badge/github.com/tamada/rrh)](https://goreportcard.com/report/github.com/tamada/rrh)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

# RRH
Expand Down Expand Up @@ -51,6 +52,18 @@ RRH is now growing. Please hack RRH itself.

# Installation

## Homebrew

Install rrh via [Homebrew](https://brew.sh), simply run:

```sh
$ brew tap tamada/rrh
$ brew install rrh
```


## Go lang

To install cli, simply run:

```
Expand Down
2 changes: 1 addition & 1 deletion clone/clone_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Help function shows the help message.
func (clone *CloneCommand) Help() string {
return `rrh clone [OPTIONS] <REMOTE_REPOS...>
OPTIONS
-g, --group <GROUP> print managed repositories categoried in the group.
-g, --group <GROUP> print managed repositories categorized in the group.
-d, --dest <DEST> specify the destination.
-v, --verbose verbose mode.
ARGUMENTS
Expand Down
2 changes: 1 addition & 1 deletion clone/clone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func TestCloneNotGitRepository(t *testing.T) {
func TestHelpAndSynopsis(t *testing.T) {
var helpMessage = `rrh clone [OPTIONS] <REMOTE_REPOS...>
OPTIONS
-g, --group <GROUP> print managed repositories categoried in the group.
-g, --group <GROUP> print managed repositories categorized in the group.
-d, --dest <DEST> specify the destination.
-v, --verbose verbose mode.
ARGUMENTS
Expand Down
6 changes: 3 additions & 3 deletions common/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestCreateRepository(t *testing.T) {
t.Error(err1.Error())
}

var r2, err2 = db.CreateRepository("somerepo", "unknown", []Remote{Remote{"name1", "url1"}, Remote{"name2", "url2"}})
var r2, err2 = db.CreateRepository("somerepo", "unknown", []Remote{{"name1", "url1"}, {"name2", "url2"}})
if r2 == nil && err2 != nil {
t.Error("somerepo: cannot create repository")
}
Expand Down Expand Up @@ -265,9 +265,9 @@ func TestHasGroup(t *testing.T) {
t.Error("rrh: no relation with no-group")
}
if db.HasRelation("unknown", "rrh") {
t.Error("rrh: unknown relatin found!")
t.Error("rrh: unknown relation found!")
}
if db.HasRelation("no-group", "unknown") {
t.Error("unknown relatin in no-group found!")
t.Error("unknown relation in no-group found!")
}
}
2 changes: 1 addition & 1 deletion common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func Strftime(before time.Time, config *Config) string {
}

/*
CaptureStdout is refered from https://qiita.com/kami_zh/items/ff636f15da87dabebe6c.
CaptureStdout is referred from https://qiita.com/kami_zh/items/ff636f15da87dabebe6c.
*/
func CaptureStdout(f func()) (string, error) {
r, w, err := os.Pipe()
Expand Down