diff --git a/.gitignore b/.gitignore index 0e40008..5c4c5f0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,6 @@ ./cache /vendor/ /release/ -jenkins-job-ctl +jenkins-job-cli /trush/ /_build/ diff --git a/Makefile b/Makefile index 7e079ab..d4afcbf 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -NAME=jenkins-job-ctl +NAME=jenkins-job-cli VERSION=$(shell cat VERSION) BUILD=$(shell git rev-parse --short HEAD) EXT_LD_FLAGS="-Wl,--allow-multiple-definition" @@ -10,22 +10,22 @@ clean: build: go mod download - CGO_ENABLED=0 go build -tags release -ldflags $(LD_FLAGS) -o jenkins-job-ctl + CGO_ENABLED=0 go build -tags release -ldflags $(LD_FLAGS) -o jenkins-job-cli build-dev: go build -ldflags "-w -X main.version=$(VERSION)-dev -X main.build=$(BUILD) -extldflags=$(EXT_LD_FLAGS)" build-all: mkdir -p _build - GOOS=darwin GOARCH=amd64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-ctl-$(VERSION)-darwin-amd64 - GOOS=linux GOARCH=amd64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-ctl-$(VERSION)-linux-amd64 - GOOS=linux GOARCH=arm go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-ctl-$(VERSION)-linux-arm - GOOS=linux GOARCH=arm64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-ctl-$(VERSION)-linux-arm64 - GOOS=windows GOARCH=amd64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-ctl-$(VERSION)-windows-amd64 + GOOS=darwin GOARCH=amd64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-cli-$(VERSION)-darwin-amd64 + GOOS=linux GOARCH=amd64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-cli-$(VERSION)-linux-amd64 + GOOS=linux GOARCH=arm go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-cli-$(VERSION)-linux-arm + GOOS=linux GOARCH=arm64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-cli-$(VERSION)-linux-arm64 + GOOS=windows GOARCH=amd64 go build -tags release -ldflags $(LD_FLAGS) -o _build/jenkins-job-cli-$(VERSION)-windows-amd64 cd _build; sha256sum * > sha256sums.txt image: - docker build -t jenkins-job-ctl -f Dockerfile . + docker build -t jenkins-job-cli -f Dockerfile . release: mkdir release diff --git a/README.md b/README.md index 5295bbb..ab32aad 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ An execution will be like this: ![terminal demo](assets/demo.gif) ## Install -Fetch the [latest release](https://github.com/gocruncher/jenkins-job-ctl/releases) for your platform: +Fetch the [latest release](https://github.com/gocruncher/jenkins-job-cli/releases) for your platform: #### Linux ```bash -sudo wget https://github.com/gocruncher/jenkins-job-ctl/releases/download/v1.0.1/jenkins-job-ctl-1.0.1-linux-amd64 -O /usr/local/bin/jj +sudo wget https://github.com/gocruncher/jenkins-job-cli/releases/download/v1.0.1/jenkins-job-cli-1.0.1-linux-amd64 -O /usr/local/bin/jj sudo chmod +x /usr/local/bin/jj ``` @@ -24,7 +24,7 @@ brew install jj ``` #### OS X bash ```bash -sudo curl -Lo /usr/local/bin/jj https://github.com/gocruncher/jenkins-job-ctl/releases/download/v1.0.1/jenkins-job-ctl-1.0.1-darwin-amd64 +sudo curl -Lo /usr/local/bin/jj https://github.com/gocruncher/jenkins-job-cli/releases/download/v1.0.1/jenkins-job-cli-1.0.1-darwin-amd64 sudo chmod +x /usr/local/bin/jj ``` @@ -93,4 +93,4 @@ jj use PROD - support of a terminal window resizing ## License -`jenkins-job-ctl` is open-sourced software licensed under the [MIT](LICENSE) license. +`jenkins-job-cli` is open-sourced software licensed under the [MIT](LICENSE) license. diff --git a/cmd/del.go b/cmd/del.go index 2d186d3..91bf47e 100644 --- a/cmd/del.go +++ b/cmd/del.go @@ -2,7 +2,7 @@ package cmd import ( "fmt" - "github.com/gocruncher/jenkins-job-ctl/cmd/jj" + "github.com/gocruncher/jenkins-job-cli/cmd/jj" "github.com/spf13/cobra" ) diff --git a/cmd/get.go b/cmd/get.go index 652974c..fc40aeb 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -17,7 +17,7 @@ package cmd import ( "fmt" - "github.com/gocruncher/jenkins-job-ctl/cmd/jj" + "github.com/gocruncher/jenkins-job-cli/cmd/jj" "github.com/spf13/cobra" "os" "regexp" diff --git a/cmd/root.go b/cmd/root.go index 1b33210..febdd63 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -19,7 +19,7 @@ import ( "bytes" "errors" "fmt" - "github.com/gocruncher/jenkins-job-ctl/cmd/jj" + "github.com/gocruncher/jenkins-job-cli/cmd/jj" "github.com/spf13/cobra" "io" "os" @@ -86,7 +86,7 @@ const defaultBoilerPlate = ` var rootCmd = &cobra.Command{ Use: "jj", Short: "jj - simple command line utility which just runs any jenkins job", - Long: `jenkins-job-ctl(jj) is a simple command-line utility which just runs + Long: `jenkins-job-cli(jj) is a simple command-line utility which just runs any Jenkins job. Before you start, please configure access to to the Jenkins service using "jj set" command. After that, you can enable shell autocompletion for convenient work. To do this, run following: diff --git a/cmd/run.go b/cmd/run.go index 5d7d8a9..7bbad52 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/chzyer/readline" "github.com/gocruncher/bar" - "github.com/gocruncher/jenkins-job-ctl/cmd/jj" + "github.com/gocruncher/jenkins-job-cli/cmd/jj" "github.com/spf13/cobra" "github.com/ttacon/chalk" "net/url" diff --git a/cmd/set.go b/cmd/set.go index b8bf43e..e793fd9 100644 --- a/cmd/set.go +++ b/cmd/set.go @@ -2,7 +2,7 @@ package cmd import ( "fmt" - "github.com/gocruncher/jenkins-job-ctl/cmd/jj" + "github.com/gocruncher/jenkins-job-cli/cmd/jj" "github.com/spf13/cobra" ) diff --git a/cmd/use.go b/cmd/use.go index 8afa597..caf13ad 100644 --- a/cmd/use.go +++ b/cmd/use.go @@ -2,7 +2,7 @@ package cmd import ( "fmt" - "github.com/gocruncher/jenkins-job-ctl/cmd/jj" + "github.com/gocruncher/jenkins-job-cli/cmd/jj" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index 624d434..3e1cac9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/gocruncher/jenkins-job-ctl +module github.com/gocruncher/jenkins-job-cli go 1.15 diff --git a/gobuild.sh b/gobuild.sh index 642f6e5..297d183 100755 --- a/gobuild.sh +++ b/gobuild.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eux export GOPATH="$(pwd)/.gobuild" -SRCDIR="${GOPATH}/src/github.com/gocruncher/jenkins-job-ctl" +SRCDIR="${GOPATH}/src/github.com/gocruncher/jenkins-job-cli" [ -d ${GOPATH} ] && rm -rf ${GOPATH} mkdir -p ${GOPATH}/{src,pkg,bin} diff --git a/main.go b/main.go index 989e0b7..f3645e7 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/gocruncher/jenkins-job-ctl/cmd" + "github.com/gocruncher/jenkins-job-cli/cmd" ) func main() {