Skip to content

Commit

Permalink
Merge pull request #20 from koudaiii/koudaiii/qucli
Browse files Browse the repository at this point in the history
Change name qucli
  • Loading branch information
koudaiii authored Jan 24, 2017
2 parents 0c5bebd + da5cba4 commit cbcbb83
Show file tree
Hide file tree
Showing 19 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*
!bin/qcli
!bin/qucli
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ deploy:
file_glob: true
file: 'dist/*.{tar.gz,zip}'
on:
repo: koudaiii/qcli
repo: koudaiii/qucli
tags: true
go: '1.7'
- provider: script
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 0.3.0 (2017-01-23)

- Change repository name from dockerepos to qcli.
- Change repository name from dockerepos to qucli.
- Supported only Quay

## 0.2.0 (2017-01-18)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ FROM alpine:3.4

RUN apk add --no-cache --update ca-certificates

COPY bin/qcli /qcli
COPY bin/qucli /qucli

ENTRYPOINT ["/qcli"]
ENTRYPOINT ["/qucli"]
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME := qcli
VERSION := v0.3.0
NAME := qucli
VERSION := v0.4.0
REVISION := $(shell git rev-parse --short HEAD)

SRCS := $(shell find . -name '*.go' -type f)
Expand All @@ -8,7 +8,7 @@ LDFLAGS := -ldflags="-s -w -X \"main.Version=$(VERSION)\" -X \"main.GitCommit=
DIST_DIRS := find * -type d -exec

DOCKER_REPOSITORY := quay.io
DOCKER_IMAGE_NAME := $(DOCKER_REPOSITORY)/koudaiii/qcli
DOCKER_IMAGE_NAME := $(DOCKER_REPOSITORY)/koudaiii/qucli
DOCKER_IMAGE_TAG ?= latest
DOCKER_IMAGE := $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)

Expand Down
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# qcli
# qucli

[![Build Status](https://travis-ci.org/koudaiii/qcli.svg?branch=master)](https://travis-ci.org/koudaiii/dqcli)
[![Docker Repository on Quay](https://quay.io/repository/koudaiii/qcli/status "Docker Repository on Quay")](https://quay.io/repository/koudaiii/qcli)
[![GitHub release](https://img.shields.io/github/release/koudaiii/qcli.svg)](https://github.com/koudaiii/qcli/releases)
[![Build Status](https://travis-ci.org/koudaiii/qucli.svg?branch=master)](https://travis-ci.org/koudaiii/dqucli)
[![Docker Repository on Quay](https://quay.io/repository/koudaiii/qucli/status "Docker Repository on Quay")](https://quay.io/repository/koudaiii/qucli)
[![GitHub release](https://img.shields.io/github/release/koudaiii/qucli.svg)](https://github.com/koudaiii/qucli/releases)

## Description

Expand Down Expand Up @@ -39,40 +39,40 @@ Formula is available at [koudaiii/homebrew-tools](https://github.com/koudaiii/ho

```bash
$ brew tap koudaiii/tools
$ brew install qcli
$ brew install qucli
```

### Precompiled binary

Precompiled binaries for Windows, OS X, Linux are available at [Releases](https://github.com/koudaiii/qcli/releases).
Precompiled binaries for Windows, OS X, Linux are available at [Releases](https://github.com/koudaiii/qucli/releases).

### From source
To install, use `go get`:

```bash
$ go get -d github.com/koudaiii/qcli
$ cd $GOPATH/src/github.com/koudaiii/qcli
$ go get -d github.com/koudaiii/qucli
$ cd $GOPATH/src/github.com/koudaiii/qucli
$ make deps
$ make install
```

### Run in a Docker container

docker image is available at [quay.io/koudaiii/qcli](https://quay.io/repository/koudaiii/qcli).
docker image is available at [quay.io/koudaiii/qucli](https://quay.io/repository/koudaiii/qucli).

```bash
# -t is required to colorize logs
$ docker run \
--rm \
-t \
-e QUAY_API_TOKEN=foobar \
quay.io/koudaiii/qcli:latest
quay.io/koudaiii/qucli:latest
```

## Usage

```bash
usage: qcli [--version] [--help] <command> [<args>]
usage: qucli [--version] [--help] <command> [<args>]

Available commands are:
add-team Add team in repository
Expand All @@ -83,7 +83,7 @@ Available commands are:
delete-user Delete user in repository
get Get repository and Permissions in Quay
list List repository and Permissions in Quay
version Print qcli version and quit
version Print qucli version and quit

```

Expand All @@ -94,10 +94,10 @@ List repository in namespace
With `--is-public` option, you can `true` or `false`

```bsah
$ qcli list koudaiii
$ qucli list koudaiii
NAME isPublic DESCRIPTION
quay.io/koudaiii/apig-sample true
quay.io/koudaiii/qcli true
quay.io/koudaiii/qucli true
quay.io/koudaiii/kubeps true
quay.io/koudaiii/test true
```
Expand All @@ -107,7 +107,7 @@ quay.io/koudaiii/test true
Get repository and Permissions in Quay

```bash
$ qcli get wantedly/test
$ qucli get wantedly/test
Repository:
quay.io/wantedly/test
Visibility:
Expand All @@ -123,7 +123,7 @@ Create repository in Quay
With `--visibility` option, you can `public` or `private`

```bash
$ qcli create wantedly/test --visibility private
$ qucli create wantedly/test --visibility private
Created! quay.io/wantedly/test
```

Expand All @@ -132,12 +132,12 @@ Created! quay.io/wantedly/test
Delete repository in Quay

```bash
$ qcli delete wantedly/test
$ qucli delete wantedly/test
Deleted! quay.io/wantedly/test
```

```bash
$ qcli get wantedly/test
$ qucli get wantedly/test
err: HTTP error!
URL: https://quay.io/api/v1/repository/wantedly/test
status code: 404
Expand All @@ -152,12 +152,12 @@ Add user in repository
With `--role` option, you can `read` or `write` or `admin`

```bash
$ qcli add-user wantedly/test dtan4 --role write
$ qucli add-user wantedly/test dtan4 --role write
Added! dtan4(write) in quay.io/wantedly/test
```

```bash
$ qcli get wantedly/test
$ qucli get wantedly/test
Repository:
quay.io/wantedly/test
Visibility:
Expand All @@ -174,12 +174,12 @@ Add team in repository
With `--role` option, you can `read` or `write` or `admin`

```bash
$ qcli add-team wantedly/test infrastructure --role write
$ qucli add-team wantedly/test infrastructure --role write
Added! infrastructure(write) in quay.io/wantedly/test
```

```bash
$ qcli get wantedly/test
$ qucli get wantedly/test
Repository:
quay.io/wantedly/test
Visibility:
Expand All @@ -195,12 +195,12 @@ Permissions:
Delete user from repository

```bash
$ qcli delete-user wantedly/test dtan4
$ qucli delete-user wantedly/test dtan4
Deleted! dtan4 in quay.io/wantedly/test
```

```bash
$ qcli get wantedly/test
$ qucli get wantedly/test
Repository:
quay.io/wantedly/test
Visibility:
Expand All @@ -215,12 +215,12 @@ Permissions:
Delete team from repository

```bash
$ qcli delete-team wantedly/test infrastructure
$ qucli delete-team wantedly/test infrastructure
Deleted! infrastructure in quay.io/wantedly/test
```

```bash
$ qcli get wantedly/test
$ qucli get wantedly/test
Repository:
quay.io/wantedly/test
Visibility:
Expand All @@ -244,14 +244,14 @@ Permissions:
Clone this repository and build using `make`.

```bash
$ go get -d github.com/koudaiii/qcli
$ cd $GOPATH/src/github.com/koudaiii/qcli
$ go get -d github.com/koudaiii/qucli
$ cd $GOPATH/src/github.com/koudaiii/qucli
$ make
```

## Contribution

1. Fork ([https://github.com/koudaiii/qcli/fork](https://github.com/koudaiii/qcli/fork))
1. Fork ([https://github.com/koudaiii/qucli/fork](https://github.com/koudaiii/qucli/fork))
1. Create a feature branch
1. Commit your changes
1. Rebase your local changes against the master branch
Expand Down
2 changes: 1 addition & 1 deletion cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/koudaiii/qcli/command"
"github.com/koudaiii/qucli/command"
"github.com/mitchellh/cli"
)

Expand Down
6 changes: 3 additions & 3 deletions command/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/koudaiii/qcli/quay"
"github.com/koudaiii/qucli/quay"
)

type CreateCommand struct {
Expand Down Expand Up @@ -45,9 +45,9 @@ func (c *CreateCommand) Synopsis() string {

func (c *CreateCommand) Help() string {
helpText := `
qcli supported only Quay.io
qucli supported only Quay.io
Usage: create
qcli create koudaiii/qcli --visibility private
qucli create koudaiii/qucli --visibility private
`
return strings.TrimSpace(helpText)
}
6 changes: 3 additions & 3 deletions command/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/koudaiii/qcli/quay"
"github.com/koudaiii/qucli/quay"
)

type DeleteCommand struct {
Expand Down Expand Up @@ -39,9 +39,9 @@ func (c *DeleteCommand) Synopsis() string {

func (c *DeleteCommand) Help() string {
helpText := `
qcli supported only Quay.io
qucli supported only Quay.io
Usage: delete
qcli delete koudaiii/qcli
qucli delete koudaiii/qucli
`
return strings.TrimSpace(helpText)
}
2 changes: 1 addition & 1 deletion command/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var (
)

func FlagInit(args []string) error {
flags := flag.NewFlagSet("qcli", flag.ExitOnError)
flags := flag.NewFlagSet("qucli", flag.ExitOnError)

flags.Usage = func() {
flags.PrintDefaults()
Expand Down
6 changes: 3 additions & 3 deletions command/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/koudaiii/qcli/quay"
"github.com/koudaiii/qucli/quay"
)

type GetCommand struct {
Expand Down Expand Up @@ -68,9 +68,9 @@ func (c *GetCommand) Synopsis() string {

func (c *GetCommand) Help() string {
helpText := `
qcli supported only Quay.io
qucli supported only Quay.io
Usage: get
qcli get koudaiii/qcli
qucli get koudaiii/qucli
`
return strings.TrimSpace(helpText)
}
6 changes: 3 additions & 3 deletions command/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"text/tabwriter"

"github.com/koudaiii/qcli/quay"
"github.com/koudaiii/qucli/quay"
"strconv"
)

Expand Down Expand Up @@ -53,9 +53,9 @@ func (c *ListCommand) Synopsis() string {

func (c *ListCommand) Help() string {
helpText := `
qcli supported only Quay.io
qucli supported only Quay.io
Usage: list
qcli list
qucli list
`
return strings.TrimSpace(helpText)
}
10 changes: 5 additions & 5 deletions command/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/koudaiii/qcli/quay"
"github.com/koudaiii/qucli/quay"
)

type AddTeamCommand struct {
Expand Down Expand Up @@ -48,9 +48,9 @@ func (c *AddTeamCommand) Synopsis() string {

func (c *AddTeamCommand) Help() string {
helpText := `
qcli supported only Quay.io
qucli supported only Quay.io
Usage: add-team
qcli add-user koudaiii/qcli infrastructure --role admin
qucli add-user koudaiii/qucli infrastructure --role admin
`
return strings.TrimSpace(helpText)
}
Expand Down Expand Up @@ -82,9 +82,9 @@ func (c *DeleteTeamCommand) Synopsis() string {

func (c *DeleteTeamCommand) Help() string {
helpText := `
qcli supported only Quay.io
qucli supported only Quay.io
Usage: delete-team
qcli delete-team koudaiii/qcli infrastructure
qucli delete-team koudaiii/qucli infrastructure
`
return strings.TrimSpace(helpText)
}
Loading

0 comments on commit cbcbb83

Please sign in to comment.