From 5a841271180ef6dda336579b0d0d78319f354d7b Mon Sep 17 00:00:00 2001 From: Derik Evangelista Date: Thu, 19 Dec 2024 10:57:01 +0000 Subject: [PATCH] feat: `go install` will now install a `kratix` binary (#66) closes #65 --- Makefile | 2 +- README.md | 2 +- main.go => cmd/kratix/main.go | 0 test/suite_test.go | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename main.go => cmd/kratix/main.go (100%) diff --git a/Makefile b/Makefile index f9a9822..7ee7b88 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ test: # Run tests go run github.com/onsi/ginkgo/v2/ginkgo -r build: # Build the binary - CGO_ENABLED=0 go build -o bin/kratix main.go + CGO_ENABLED=0 go build -o bin/kratix ./cmd/kratix/main.go build-aspects: build-operator-promise-aspect build-helm-promise-aspect # build all aspects diff --git a/README.md b/README.md index 3b04a23..99a5fae 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The best tool you'll ever find to build your Promises! To build the CLI, run: ```bash -make build +go install github.com/syntasso/kratix-cli/cmd/kratix@latest ``` The binary will be available at `./bin/kratix`. diff --git a/main.go b/cmd/kratix/main.go similarity index 100% rename from main.go rename to cmd/kratix/main.go diff --git a/test/suite_test.go b/test/suite_test.go index 803edf3..61bcac8 100644 --- a/test/suite_test.go +++ b/test/suite_test.go @@ -21,7 +21,7 @@ func TestIntegration(t *testing.T) { var _ = BeforeSuite(func() { var err error - binaryPath, err = gexec.Build("github.com/syntasso/kratix-cli") + binaryPath, err = gexec.Build("github.com/syntasso/kratix-cli/cmd/kratix") Expect(err).NotTo(HaveOccurred()) })