Skip to content

Commit

Permalink
Merge pull request #43 from jobtalk/rename
Browse files Browse the repository at this point in the history
thorからpnzrにリポジトリ名を変更
  • Loading branch information
shirase_aoi authored May 17, 2017
2 parents a416946 + 3004bea commit 3071686
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 66 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ build:
@mkdir -p bin/darwin
@mkdir -p bin/linux
@echo "build linux binary"
@GOOS=linux GOARCH=amd64 go build -ldflags '-X "main.VERSION=$(VERSION)" -X "main.BUILD_DATE=$(DATE)" -X "main.BUILD_OS=$(BUILD_OS)"' -o bin/linux/thor
@GOOS=linux GOARCH=amd64 go build -ldflags '-X "main.VERSION=$(VERSION)" -X "main.BUILD_DATE=$(DATE)" -X "main.BUILD_OS=$(BUILD_OS)"' -o bin/linux/pnzr
@echo "build darwin binary"
@GOOS=darwin GOARCH=amd64 go build -ldflags '-X "main.VERSION=$(VERSION)" -X "main.BUILD_DATE=$(DATE)" -X "main.BUILD_OS=$(BUILD_OS)"' -o bin/darwin/thor
@GOOS=darwin GOARCH=amd64 go build -ldflags '-X "main.VERSION=$(VERSION)" -X "main.BUILD_DATE=$(DATE)" -X "main.BUILD_OS=$(BUILD_OS)"' -o bin/darwin/pnzr
.PHONY: build


Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# thor
# pnzr
ecs deploy docker container

[![CircleCI](https://circleci.com/gh/jobtalk/thor.svg?style=shield)](https://circleci.com/gh/jobtalk/thor)
[![CircleCI](https://circleci.com/gh/jobtalk/pnzr.svg?style=shield)](https://circleci.com/gh/jobtalk/pnzr)
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)

## Support Go version
Expand All @@ -13,44 +13,44 @@ Can be installed in either way.
### Use install script
On macOS, or Linux run the following:
```
$ curl https://raw.githubusercontent.com/jobtalk/thor/master/install.sh | sh
$ curl https://raw.githubusercontent.com/jobtalk/pnzr/master/install.sh | sh
```

Note that you may need to run the sudo version below, or alternatively chown /usr/local:
```
$ curl https://raw.githubusercontent.com/jobtalk/thor/master/install.sh | sudo sh
$ curl https://raw.githubusercontent.com/jobtalk/pnzr/master/install.sh | sudo sh
```

### Use Go get
```
$ go get -u github.com/jobtalk/thor
$ go get -u github.com/jobtalk/pnzr
```

### Use Homebrew
```
$ brew tap ieee0824/thor
$ brew tap ieee0824/pnzr
$ brew update
$ brew install thor
$ brew install pnzr
```
## Detailed instructions
Please read the [wiki](https://github.com/jobtalk/thor/wiki).
Please read the [wiki](https://github.com/jobtalk/pnzr/wiki).


## Deploy
```
$ thor deploy -f config.json
$ pnzr deploy -f config.json
```

## Option
```
$ go run main.go -h
Usage: thor [--version] [--help] <command> [<args>]
Usage: pnzr [--version] [--help] <command> [<args>]
Available commands are:
deploy usage: thor deploy [options ...]
deploy usage: pnzr deploy [options ...]
options:
-f thor_setting.json
-f pnzr_setting.json
-profile=${aws profile name}
-profile option is arbitrary parameter.
Expand All @@ -62,15 +62,15 @@ options:
setting outer values
===================================================
mkelb usage: thor mkelb [options ...]
mkelb usage: pnzr mkelb [options ...]
options:
-f thor_setting.json
-f pnzr_setting.json
--profile=${aws profile name}
--profile option is arbitrary parameter.
===================================================
vault usage: thor vault [options ...]
vault usage: pnzr vault [options ...]
options:
-key_id
set kms key id
Expand Down
4 changes: 2 additions & 2 deletions api/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package api
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/elbv2"
"github.com/jobtalk/thor/lib"
"github.com/jobtalk/thor/lib/setting"
"github.com/jobtalk/pnzr/lib"
"github.com/jobtalk/pnzr/lib/setting"
)

// serviceが存在しない時はサービスを作る
Expand Down
4 changes: 2 additions & 2 deletions api/mkelb.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package api
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/elbv2"
"github.com/jobtalk/thor/lib"
"github.com/jobtalk/thor/lib/setting"
"github.com/jobtalk/pnzr/lib"
"github.com/jobtalk/pnzr/lib/setting"
)

func createTargetGroup(awsConfig *aws.Config, s *elbv2.CreateTargetGroupInput) (*elbv2.CreateTargetGroupOutput, error) {
Expand Down
16 changes: 8 additions & 8 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
jobs:
build:
working_directory: /go/src/github.com/jobtalk/thor
working_directory: /go/src/github.com/jobtalk/pnzr
docker:
- image: golang:latest
environment:
Expand All @@ -27,7 +27,7 @@ jobs:
command: |
go test $(glide novendor)
- run:
name: "build thor"
name: "build pnzr"
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
make
Expand All @@ -39,17 +39,17 @@ jobs:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
HASH=$(git rev-parse --short HEAD)
github-release release -u jobtalk -r thor -t "${HASH}" -n "${HASH}" -d "${HASH}" -p
github-release upload -u jobtalk -r thor -t "${HASH}" --name "thor-darwin-amd64" --file bin/darwin/thor
github-release upload -u jobtalk -r thor -t "${HASH}" --name "thor-linux-amd64" --file bin/linux/thor
github-release release -u jobtalk -r pnzr -t "${HASH}" -n "${HASH}" -d "${HASH}" -p
github-release upload -u jobtalk -r pnzr -t "${HASH}" --name "pnzr-darwin-amd64" --file bin/darwin/pnzr
github-release upload -u jobtalk -r pnzr -t "${HASH}" --name "pnzr-linux-amd64" --file bin/linux/pnzr
fi
- deploy:
name: "release release branch"
command: |
if [[ "$CIRCLE_BRANCH" =~ ^release-.* ]]; then
VERSION=${CIRCLE_BRANCH#release-} make
VERSION=${CIRCLE_BRANCH#release-}
github-release release -u jobtalk -r thor -t "${VERSION}" -n "${VERSION}" -d "${VERSION}"
github-release upload -u jobtalk -r thor -t "${VERSION}" --name "thor-darwin-amd64" --file bin/darwin/thor
github-release upload -u jobtalk -r thor -t "${VERSION}" --name "thor-linux-amd64" --file bin/linux/thor
github-release release -u jobtalk -r pnzr -t "${VERSION}" -n "${VERSION}" -d "${VERSION}"
github-release upload -u jobtalk -r pnzr -t "${VERSION}" --name "pnzr-darwin-amd64" --file bin/darwin/pnzr
github-release upload -u jobtalk -r pnzr -t "${VERSION}" --name "pnzr-linux-amd64" --file bin/linux/pnzr
fi
2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package: github.com/jobtalk/thor
package: github.com/jobtalk/pnzr
import:
- package: github.com/aws/aws-sdk-go
version: ^1.8.12
Expand Down
14 changes: 7 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ install() {
exit 1
fi
fi
LATEST=$(curl -s https://api.github.com/repos/jobtalk/thor/tags | grep -Eo '"name":.*[^\\]",' | head -n 1 | sed 's/[," ]//g' | cut -d ':' -f 2)
URL="https://github.com/jobtalk/thor/releases/download/$LATEST/thor-$PLATFORM"
DEST=${DEST:-/usr/local/bin/thor}
LATEST=$(curl -s https://api.github.com/repos/jobtalk/pnzr/tags | grep -Eo '"name":.*[^\\]",' | head -n 1 | sed 's/[," ]//g' | cut -d ':' -f 2)
URL="https://github.com/jobtalk/pnzr/releases/download/$LATEST/pnzr-$PLATFORM"
DEST=${DEST:-/usr/local/bin/pnzr}

if [ -z $LATEST ] ; then
echo "Error requesting. Download binary from https://github.com/jobtalk/thor/releases"
echo "Error requesting. Download binary from https://github.com/jobtalk/pnzr/releases"
exit 1
else
echo "Downloading thor binary from https://github.com/jobtalk/thor/releases/download/$LATEST/thor-$PLATFORM to $DEST"
if curl -sL https://github.com/jobtalk/thor/releases/download/$LATEST/thor-$PLATFORM -o $DEST; then
echo "Downloading pnzr binary from https://github.com/jobtalk/pnzr/releases/download/$LATEST/pnzr-$PLATFORM to $DEST"
if curl -sL https://github.com/jobtalk/pnzr/releases/download/$LATEST/pnzr-$PLATFORM -o $DEST; then
chmod +x $DEST
echo "thor installation was successful"
echo "pnzr installation was successful"
else
echo "Installation failed. You may need elevated permissions."
fi
Expand Down
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"os"
"runtime"

"github.com/jobtalk/thor/subcmd/deploy"
"github.com/jobtalk/thor/subcmd/mkelb"
"github.com/jobtalk/thor/subcmd/update"
"github.com/jobtalk/thor/subcmd/vault"
"github.com/jobtalk/thor/subcmd/vault_edit"
"github.com/jobtalk/thor/subcmd/vault_view"
"github.com/jobtalk/thor/vars"
"github.com/jobtalk/pnzr/subcmd/deploy"
"github.com/jobtalk/pnzr/subcmd/mkelb"
"github.com/jobtalk/pnzr/subcmd/update"
"github.com/jobtalk/pnzr/subcmd/vault"
"github.com/jobtalk/pnzr/subcmd/vault_edit"
"github.com/jobtalk/pnzr/subcmd/vault_view"
"github.com/jobtalk/pnzr/vars"
"github.com/mitchellh/cli"
)

Expand Down Expand Up @@ -44,7 +44,7 @@ func init() {
}

func main() {
c := cli.NewCLI("thor", VERSION)
c := cli.NewCLI("pnzr", VERSION)
c.Args = os.Args[1:]
c.Commands = map[string]cli.CommandFactory{
"deploy": func() (cli.Command, error) {
Expand Down
10 changes: 5 additions & 5 deletions subcmd/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/jobtalk/thor/api"
"github.com/jobtalk/thor/lib"
"github.com/jobtalk/thor/lib/setting"
"github.com/jobtalk/pnzr/api"
"github.com/jobtalk/pnzr/lib"
"github.com/jobtalk/pnzr/lib/setting"
)

var re = regexp.MustCompile(`.*\.json$`)
Expand Down Expand Up @@ -230,9 +230,9 @@ func (c *Deploy) Run(args []string) int {

func (c *Deploy) Synopsis() string {
synopsis := ""
synopsis += "usage: thor deploy [options ...]\n"
synopsis += "usage: pnzr deploy [options ...]\n"
synopsis += "options:\n"
synopsis += " -f thor_setting.json\n"
synopsis += " -f pnzr_setting.json\n"
synopsis += "\n"
synopsis += " -profile=${aws profile name}\n"
synopsis += " -profile option is arbitrary parameter.\n"
Expand Down
2 changes: 1 addition & 1 deletion subcmd/deploy/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package deploy
import "os"

var (
TEST_DIR = os.Getenv("GOPATH") + "/src/github.com/jobtalk/thor/test"
TEST_DIR = os.Getenv("GOPATH") + "/src/github.com/jobtalk/pnzr/test"
)

func init() {
Expand Down
10 changes: 5 additions & 5 deletions subcmd/mkelb/mkelb.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/jobtalk/thor/api"
"github.com/jobtalk/thor/lib/setting"
"github.com/jobtalk/pnzr/api"
"github.com/jobtalk/pnzr/lib/setting"
)

// --hoge=hugaみたいなやつ
Expand Down Expand Up @@ -98,7 +98,7 @@ func (c *MkELB) Help() string {
help := ""
help += "usage: mkelb [options ...]\n"
help += "options:\n"
help += " -f thor_setting.json\n"
help += " -f pnzr_setting.json\n"
help += "\n"
help += " --profile=${aws profile name}\n"
help += " --profile option is arbitrary parameter.\n"
Expand Down Expand Up @@ -138,9 +138,9 @@ func (c *MkELB) Run(args []string) int {

func (c *MkELB) Synopsis() string {
synopsis := ""
synopsis += "usage: thor mkelb [options ...]\n"
synopsis += "usage: pnzr mkelb [options ...]\n"
synopsis += "options:\n"
synopsis += " -f thor_setting.json\n"
synopsis += " -f pnzr_setting.json\n"
synopsis += "\n"
synopsis += " --profile=${aws profile name}\n"
synopsis += " --profile option is arbitrary parameter.\n"
Expand Down
6 changes: 3 additions & 3 deletions subcmd/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"os"
"runtime"

"github.com/jobtalk/thor/vars"
"github.com/jobtalk/pnzr/vars"
)

const (
GITHUB_API = "https://api.github.com/repos/jobtalk/thor/tags"
GITHUB_API = "https://api.github.com/repos/jobtalk/pnzr/tags"
)

var client = &http.Client{}
Expand Down Expand Up @@ -89,7 +89,7 @@ func (c *Update) Run(args []string) int {
fmt.Println("can not get latest version")
return 255
}
binaryURL := fmt.Sprintf("https://github.com/jobtalk/thor/releases/download/%s/thor-%s", latest, platform)
binaryURL := fmt.Sprintf("https://github.com/jobtalk/pnzr/releases/download/%s/pnzr-%s", latest, platform)

dir, err := os.Executable()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions subcmd/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/jobtalk/thor/lib"
"github.com/jobtalk/pnzr/lib"
)

var flagSet = &flag.FlagSet{}
Expand Down Expand Up @@ -74,7 +74,7 @@ type Vault struct{}

func (c *Vault) Help() string {
var msg string
msg += "usage: thor vault [options ...]\n"
msg += "usage: pnzr vault [options ...]\n"
msg += "options:\n"
msg += " -key_id\n"
msg += " set kms key id\n"
Expand Down
6 changes: 3 additions & 3 deletions subcmd/vault_edit/vault_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/jobtalk/thor/lib"
"github.com/jobtalk/pnzr/lib"
)

var flagSet = &flag.FlagSet{}
Expand Down Expand Up @@ -72,7 +72,7 @@ type VaultEdit struct{}

func (c *VaultEdit) Help() string {
var msg string
msg += "usage: thor vault-edit [options ...]\n"
msg += "usage: pnzr vault-edit [options ...]\n"
msg += "options:\n"
msg += " -key_id\n"
msg += " set kms key id\n"
Expand All @@ -97,7 +97,7 @@ func (c *VaultEdit) Synopsis() string {
}

func getEditor() string {
if e := os.Getenv("THOR_EDITOR"); e != "" {
if e := os.Getenv("pnzr_EDITOR"); e != "" {
return e
}

Expand Down
4 changes: 2 additions & 2 deletions subcmd/vault_view/vault_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/jobtalk/thor/lib"
"github.com/jobtalk/pnzr/lib"
)

var flagSet = &flag.FlagSet{}
Expand Down Expand Up @@ -72,7 +72,7 @@ type VaultView struct{}

func (c *VaultView) Help() string {
var msg string
msg += "usage: thor vault-view [options ...]\n"
msg += "usage: pnzr vault-view [options ...]\n"
msg += "options:\n"
msg += " -key_id\n"
msg += " set kms key id\n"
Expand Down

0 comments on commit 3071686

Please sign in to comment.