From 597ab86eba17befe1582fe3626b5f32a96bdf4ca Mon Sep 17 00:00:00 2001 From: Simon Whitaker Date: Sun, 30 Jul 2023 12:02:10 +0100 Subject: [PATCH] Rename gibo-go to gibo --- .gitignore | 1 - .goreleaser.windows.yaml | 22 +++++++++++----------- .goreleaser.yaml | 6 +++--- Dockerfile | 8 ++++---- README.md | 28 ++++++++++++++-------------- cmd/dump.go | 2 +- cmd/gibo.go | 4 ++-- cmd/list.go | 2 +- cmd/root.go | 4 ++-- cmd/search.go | 2 +- cmd/update.go | 2 +- cmd/version.go | 2 +- go.mod | 2 +- main.go | 2 +- tools/delete-windows-release.sh | 6 +++--- utils/utils.go | 2 +- 16 files changed, 47 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 96ef677..a1a4446 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ gibo dist/ -gibo-go diff --git a/.goreleaser.windows.yaml b/.goreleaser.windows.yaml index 64cddc1..6208f34 100644 --- a/.goreleaser.windows.yaml +++ b/.goreleaser.windows.yaml @@ -14,7 +14,7 @@ builds: - windows ldflags: # Default: '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser' - "-s -w -X github.com/simonwhitaker/gibo-go/cmd.version={{.Version}} -X github.com/simonwhitaker/gibo-go/cmd.commit={{.Commit}} -X github.com/simonwhitaker/gibo-go/cmd.date={{.Date}}" + "-s -w -X github.com/simonwhitaker/gibo/cmd.version={{.Version}} -X github.com/simonwhitaker/gibo/cmd.commit={{.Commit}} -X github.com/simonwhitaker/gibo/cmd.date={{.Date}}" archives: - format: zip @@ -28,20 +28,20 @@ archives: {{- if .Arm }}v{{ .Arm }}{{ end }} chocolateys: - - name: gibo-go - title: "gibo-go: Fast access to .gitignore boilerplates" - project_source_url: https://github.com/simonwhitaker/gibo-go - package_source_url: https://github.com/simonwhitaker/gibo-go - project_url: https://github.com/simonwhitaker/gibo-go - release_notes: "https://github.com/simonwhitaker/gibo-go/releases/tag/v{{ .Version }}" + - name: gibo + title: "gibo: Fast access to .gitignore boilerplates" + project_source_url: https://github.com/simonwhitaker/gibo + package_source_url: https://github.com/simonwhitaker/gibo + project_url: https://github.com/simonwhitaker/gibo + release_notes: "https://github.com/simonwhitaker/gibo/releases/tag/v{{ .Version }}" api_key: "{{ .Env.CHOCOLATEY_API_KEY }}" - docs_url: https://github.com/simonwhitaker/gibo-go/blob/main/README.md - license_url: https://github.com/simonwhitaker/gibo-go/blob/main/LICENSE + docs_url: https://github.com/simonwhitaker/gibo/blob/main/README.md + license_url: https://github.com/simonwhitaker/gibo/blob/main/LICENSE require_license_acceptance: false - url_template: "https://github.com/simonwhitaker/gibo-go/releases/download/{{ .Tag }}/{{ .ArtifactName }}" + url_template: "https://github.com/simonwhitaker/gibo/releases/download/{{ .Tag }}/{{ .ArtifactName }}" authors: Simon Whitaker description: |- - **gibo-go** (short for .gitignore boilerplates in Go) is a command-line tool to help you easily access .gitignore boilerplates from [github.com/github/gitignore](https://github.com/github/gitignore). + **gibo** (short for .gitignore boilerplates in Go) is a command-line tool to help you easily access .gitignore boilerplates from [github.com/github/gitignore](https://github.com/github/gitignore). It is a reimplementation of [gibo](https://github.com/simonwhitaker/gibo), in Go. tags: git gitignore diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 474fc39..b76064e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,7 +16,7 @@ builds: - darwin ldflags: # Default: '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser' - "-s -w -X github.com/simonwhitaker/gibo-go/cmd.version={{.Version}} -X github.com/simonwhitaker/gibo-go/cmd.commit={{.Commit}} -X github.com/simonwhitaker/gibo-go/cmd.date={{.Date}}" + "-s -w -X github.com/simonwhitaker/gibo/cmd.version={{.Version}} -X github.com/simonwhitaker/gibo/cmd.commit={{.Commit}} -X github.com/simonwhitaker/gibo/cmd.date={{.Date}}" archives: - format: tar.gz @@ -33,8 +33,8 @@ archives: - goos: windows format: zip brews: - - name: gibo-go - homepage: https://github.com/simonwhitaker/gibo-go + - name: gibo + homepage: https://github.com/simonwhitaker/gibo repository: owner: simonwhitaker name: homebrew-tap diff --git a/Dockerfile b/Dockerfile index bfab217..402e97f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,13 @@ COPY go.mod go.sum ./ RUN go mod download COPY . ./ -RUN CGO_ENABLED=0 GOOS=linux go build -o /gibo-go +RUN CGO_ENABLED=0 GOOS=linux go build -o /gibo FROM alpine:3.18.2 WORKDIR / -COPY --from=build /gibo-go /gibo-go -RUN /gibo-go update +COPY --from=build /gibo /gibo +RUN /gibo update -ENTRYPOINT [ "/gibo-go" ] +ENTRYPOINT [ "/gibo" ] diff --git a/README.md b/README.md index 7ef0af3..4b11481 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,29 @@ -# gibo-go: fast access to .gitignore boilerplates +# gibo: fast access to .gitignore boilerplates -**gibo-go** (short for .gitignore boilerplates in Go) is a command-line tool to help you easily access .gitignore boilerplates from [github.com/github/gitignore](https://github.com/github/gitignore). +**gibo** (short for .gitignore boilerplates in Go) is a command-line tool to help you easily access .gitignore boilerplates from [github.com/github/gitignore](https://github.com/github/gitignore). It is a reimplementation of [gibo](https://github.com/simonwhitaker/gibo), in Go. ## Typical usage ```console -$ gibo-go dump Swift Xcode >> .gitignore +$ gibo dump Swift Xcode >> .gitignore ``` -For additional usage instructions, run `gibo-go help`. +For additional usage instructions, run `gibo help`. ## Installation ### Using Homebrew ```sh -brew install simonwhitaker/tap/gibo-go +brew install simonwhitaker/tap/gibo ``` ### Using Chocolatey ``` -choco install gibo-go +choco install gibo ``` ### Using the Go toolchain @@ -31,7 +31,7 @@ choco install gibo-go Or install using `go install`: ```sh -go install github.com/simonwhitaker/gibo-go@latest +go install github.com/simonwhitaker/gibo@latest ``` ### Building from source @@ -39,13 +39,13 @@ go install github.com/simonwhitaker/gibo-go@latest Clone the repo, then: ```sh -cd gibo-go +cd gibo go install . ``` ### Downloading a binary -Download the latest [release](https://github.com/simonwhitaker/gibo-go/releases) for your platform, then put `gibo-go` (or `gibo-go.exe`) somewhere on your path. +Download the latest [release](https://github.com/simonwhitaker/gibo/releases) for your platform, then put `gibo` (or `gibo.exe`) somewhere on your path. ### Installation on Docker @@ -56,18 +56,18 @@ Coming soon See the instructions at: ``` -gibo-go completion +gibo completion ``` -## Use gibo-go to generate .hgignore files +## Use gibo to generate .hgignore files -The `glob` .hgignore syntax for Mercurial is compatible with .gitignore syntax. This means that you can use gibo-go to generate .hgignore files, as long as the .hgignore files use the `glob` syntax: +The `glob` .hgignore syntax for Mercurial is compatible with .gitignore syntax. This means that you can use gibo to generate .hgignore files, as long as the .hgignore files use the `glob` syntax: ```sh echo 'syntax: glob' > .hgignore -gibo-go dump Python >> .hgignore +gibo dump Python >> .hgignore ``` ## Credits -gibo-go was written by Simon Whitaker ([@s1mn](http://twitter.com/s1mn)) +gibo was written by Simon Whitaker ([@s1mn](http://twitter.com/s1mn)) diff --git a/cmd/dump.go b/cmd/dump.go index d76bb7f..92a34c7 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -3,7 +3,7 @@ package cmd import ( "log" - "github.com/simonwhitaker/gibo-go/utils" + "github.com/simonwhitaker/gibo/utils" "github.com/spf13/cobra" ) diff --git a/cmd/gibo.go b/cmd/gibo.go index dddfc2b..3afec2a 100644 --- a/cmd/gibo.go +++ b/cmd/gibo.go @@ -17,8 +17,8 @@ func init() { } var giboCmd = &cobra.Command{ - Use: "gibo-go", - Short: "gibo-go is a command-line tool for easily accessing gitignore boilerplates", + Use: "gibo", + Short: "gibo is a command-line tool for easily accessing gitignore boilerplates", } func Execute() { diff --git a/cmd/list.go b/cmd/list.go index 9c7dc31..1291dde 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/simonwhitaker/gibo-go/utils" + "github.com/simonwhitaker/gibo/utils" "github.com/spf13/cobra" "golang.org/x/term" ) diff --git a/cmd/root.go b/cmd/root.go index 9e6e78a..961f1e6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -3,13 +3,13 @@ package cmd import ( "fmt" - "github.com/simonwhitaker/gibo-go/utils" + "github.com/simonwhitaker/gibo/utils" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "root", - Short: "Show the directory where gibo-go stores its boilerplates", + Short: "Show the directory where gibo stores its boilerplates", Run: func(cmd *cobra.Command, args []string) { fmt.Println(utils.RepoDir()) }, diff --git a/cmd/search.go b/cmd/search.go index 3cac8e5..9a17678 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/simonwhitaker/gibo-go/utils" + "github.com/simonwhitaker/gibo/utils" "github.com/spf13/cobra" ) diff --git a/cmd/update.go b/cmd/update.go index 9c7e81b..0019f35 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/simonwhitaker/gibo-go/utils" + "github.com/simonwhitaker/gibo/utils" "github.com/spf13/cobra" ) diff --git a/cmd/version.go b/cmd/version.go index 932a132..e611ce3 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -18,7 +18,7 @@ var ( var versionCmd = &cobra.Command{ Use: "version", - Short: "Show the current version number of gibo-go", + Short: "Show the current version number of gibo", Run: func(cmd *cobra.Command, args []string) { fmt.Printf("%v v%v, commit %v, built on %v\n", filepath.Base(os.Args[0]), version, commit, date) }, diff --git a/go.mod b/go.mod index 433c580..805aa3f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/simonwhitaker/gibo-go +module github.com/simonwhitaker/gibo go 1.20 diff --git a/main.go b/main.go index 07f75db..e10498c 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main -import "github.com/simonwhitaker/gibo-go/cmd" +import "github.com/simonwhitaker/gibo/cmd" func main() { cmd.Execute() diff --git a/tools/delete-windows-release.sh b/tools/delete-windows-release.sh index 21829f6..4296f2f 100755 --- a/tools/delete-windows-release.sh +++ b/tools/delete-windows-release.sh @@ -11,6 +11,6 @@ fi gh release view "$tag" >/dev/null || exit 1 gh release delete-asset -y "$tag" checksums.windows.txt -gh release delete-asset -y "$tag" gibo-go_Windows_x86_64.zip -gh release delete-asset -y "$tag" gibo-go_Windows_i386.zip -gh release delete-asset -y "$tag" gibo-go_Windows_arm64.zip +gh release delete-asset -y "$tag" gibo_Windows_x86_64.zip +gh release delete-asset -y "$tag" gibo_Windows_i386.zip +gh release delete-asset -y "$tag" gibo_Windows_arm64.zip diff --git a/utils/utils.go b/utils/utils.go index 04f17bb..3dbb76e 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -91,7 +91,7 @@ func PrintBoilerplate(name string) error { relativePath = strings.ReplaceAll(relativePath, "\\", "/") } - fmt.Println("### Generated by gibo-go (https://github.com/simonwhitaker/gibo-go)") + fmt.Println("### Generated by gibo (https://github.com/simonwhitaker/gibo)") fmt.Printf("### %v%v\n\n", remoteWebRoot, relativePath) if err != nil { return err