Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
go-version-file: go.mod
- run: go test ./...
- run: go vet ./...
- run: go build -o gorse-cli ./cmd/gorse-cli
- run: go build -o gorse-cli .
- run: sh -n install.sh
8 changes: 4 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
project_name: gorse-cli
builds:
- id: gorse-cli
main: ./cmd/gorse-cli
main: .
binary: gorse-cli
env:
- CGO_ENABLED=0
Expand All @@ -16,9 +16,9 @@ builds:
- darwin_arm64
ldflags:
- >-
-X 'github.com/gorse-io/cli/internal/version.Version={{ .Version }}'
-X 'github.com/gorse-io/cli/internal/version.GitCommit={{ .Commit }}'
-X 'github.com/gorse-io/cli/internal/version.BuildTime={{ .Date }}'
-X 'main.Version={{ .Version }}'
-X 'main.GitCommit={{ .Commit }}'
-X 'main.BuildTime={{ .Date }}'
archives:
- id: gorse-cli
formats: [binary]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Build from source:
```sh
git clone https://github.com/gorse-io/cli.git
cd cli
go build -o gorse-cli ./cmd/gorse-cli
go build -o gorse-cli .
```

Use a source checkout rather than `go install ...@latest`: this module includes
Expand Down Expand Up @@ -44,7 +44,7 @@ Contexts and API keys remain in the system keyring under the existing
```sh
go test ./...
go vet ./...
go build -o gorse-cli ./cmd/gorse-cli
go build -o gorse-cli .
```

Tests start a real local Gorse Master with temporary SQLite stores. The Gorse
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions cmd/gorse-cli/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"strings"

jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/gorse-io/cli/internal/version"
gorse "github.com/gorse-io/gorse-go"
adminclient "github.com/gorse-io/gorse/client"
"github.com/samber/lo"
Expand All @@ -38,7 +37,7 @@ var rootCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
// Show version
if showVersion, _ := cmd.PersistentFlags().GetBool("version"); showVersion {
cmd.Println(version.BuildInfo())
cmd.Println(BuildInfo())
return
}
_ = cmd.Help()
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/version/version.go → version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package version
package main

import (
"fmt"
Expand Down
Loading