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
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
builds:
- main: ./cmd/qube
- main: ./cmd
id: "qube"
binary: qube
ldflags:
- -s -w -X github.com/apiqube/cli/cmd/cli.Version={{.Version}}
- -s -w -X github.com/apiqube/cli/cmd/cli.Commit={{.ShortCommit}}
- -s -w -X github.com/apiqube/cli/cmd/cli.Date={{.Date}}
- -s -w -X main.Version={{.Version}}
- -s -w -X main.Commit={{.ShortCommit}}
- -s -w -X main.Date={{.Date}}
env:
- CGO_ENABLED=0
goos: [linux, darwin, windows]
Expand Down
6 changes: 3 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3'
vars:
BINARY_NAME: qube
BUILD_DIR: C:/Users/admin/go/bin
MAIN: ./cmd/qube
MAIN: ./cmd
VERSION:
sh: git describe --tags --abbrev=0 2>/dev/null || echo "dev"

Expand All @@ -16,13 +16,13 @@ tasks:
desc: 🔧 Build Qube CLI
cmds:
- echo "🔧 Building {{.BINARY_NAME}} version {{.VERSION}}"
- go build -ldflags="-X github.com/apiqube/cli/cmd/cli.version={{.VERSION}}" -o={{.BUILD_DIR}}/{{.BINARY_NAME}}.exe {{.MAIN}}
- go build -ldflags="-X github.com/apiqube/cli/cmd.version={{.VERSION}}" -o={{.BUILD_DIR}}/{{.BINARY_NAME}}.exe {{.MAIN}}

build-versioned:
desc: 🔧 Build Qube CLI
cmds:
- echo "🔧 Building {{.BINARY_NAME}} version {{.VERSION}}"
- go build -ldflags="-X github.com/apiqube/cli/cmd/cli.version={{.VERSION}}" -o {{.BUILD_DIR}}/{{.BINARY_NAME}}-{{.VERSION}}.exe {{.MAIN}}
- go build -ldflags="-X github.com/apiqube/cli/cmd.version={{.VERSION}}" -o {{.BUILD_DIR}}/{{.BINARY_NAME}}-{{.VERSION}}.exe {{.MAIN}}

clean:
desc: 🧹 Clean build directory
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions cmd/qube/main.go → cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"github.com/apiqube/cli/cmd/cli"
"github.com/apiqube/cli/internal/core/store"
uicli "github.com/apiqube/cli/ui/cli"
)
Expand All @@ -13,5 +12,5 @@ func main() {
store.Init()
defer store.Stop()

cli.Execute()
Execute()
}
File renamed without changes.
17 changes: 8 additions & 9 deletions cmd/cli/root.go → cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package cli
package main

import (
"context"
"os"
"os/signal"
"syscall"

"github.com/apiqube/cli/cmd/cli/edit"
"github.com/apiqube/cli/cmd/apply"
"github.com/apiqube/cli/cmd/check"
"github.com/apiqube/cli/cmd/cleanup"
"github.com/apiqube/cli/cmd/edit"
"github.com/apiqube/cli/cmd/generator"
"github.com/apiqube/cli/cmd/rollback"
"github.com/apiqube/cli/cmd/search"

"github.com/apiqube/cli/ui/cli"

"github.com/apiqube/cli/cmd/cli/apply"
"github.com/apiqube/cli/cmd/cli/check"
"github.com/apiqube/cli/cmd/cli/cleanup"
"github.com/apiqube/cli/cmd/cli/generator"
"github.com/apiqube/cli/cmd/cli/rollback"
"github.com/apiqube/cli/cmd/cli/search"

"github.com/apiqube/cli/internal/config"
"github.com/spf13/cobra"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/cli/version.go → cmd/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"fmt"
Expand All @@ -13,7 +13,7 @@ var (
)

var versionCmd = &cobra.Command{
Use: "Version",
Use: "version",
Short: "Print the Version number",
SilenceUsage: true,
SilenceErrors: true,
Expand Down
Loading