diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1e2bd83 --- /dev/null +++ b/Makefile @@ -0,0 +1,49 @@ +# Makefile for NVCF CLI + +# Go parameters +GOCMD=go +GOBUILD=$(GOCMD) build +GOCLEAN=$(GOCMD) clean +GOTEST=$(GOCMD) test +GOVET=$(GOCMD) vet +BINARY_NAME=nvcf +GOFILES=$(shell find . -name '*.go' -not -path "./vendor/*") + +# Linting +GOLINT=golangci-lint + +.PHONY: all build clean test vet lint fmt + +all: build + +build: + $(GOBUILD) -o $(BINARY_NAME) + +clean: + $(GOCLEAN) + rm -f $(BINARY_NAME) + +test: + $(GOTEST) ./... + +vet: + $(GOVET) ./... + +lint: + $(GOLINT) run + +fmt: + gofmt -s -w $(GOFILES) + +# Installs golangci-lint +install-lint: + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 + +# Runs all checks +check: fmt vet lint test + +# Builds for multiple platforms +build-all: + GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-linux-amd64 + GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-darwin-amd64 + GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-windows-amd64.exe \ No newline at end of file diff --git a/README.md b/README.md index 10037bd..4059b76 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ NVCF is a command-line interface (CLI) tool for managing and interacting with NV To install the NVCF CLI, you need to have Go installed on your system. Then, you can use the following command: ```bash -go install github.com/tmc/nvcf@latest +go install github.com/brevdev/nvcf@latest ``` ## Usage @@ -72,7 +72,7 @@ Key files: The project uses the following main dependencies: - `github.com/spf13/cobra`: For building the CLI command structure -- `github.com/tmc/nvcf-go`: NVIDIA Cloud Functions Go SDK +- `github.com/brevdev/nvcf-go`: NVIDIA Cloud Functions Go SDK - `github.com/fatih/color`: For color-coded output - `github.com/olekukonko/tablewriter`: For table-formatted output @@ -94,11 +94,11 @@ This project is licensed under the [MIT License](LICENSE). ## Badges -[![Go Report Card](https://goreportcard.com/badge/github.com/tmc/nvcf)](https://goreportcard.com/report/github.com/tmc/nvcf) -[![GoDoc](https://godoc.org/github.com/tmc/nvcf?status.svg)](https://godoc.org/github.com/tmc/nvcf) +[![Go Report Card](https://goreportcard.com/badge/github.com/brevdev/nvcf)](https://goreportcard.com/report/github.com/brevdev/nvcf) +[![GoDoc](https://godoc.org/github.com/brevdev/nvcf?status.svg)](https://godoc.org/github.com/brevdev/nvcf) ## Support -For issues, feature requests, or questions, please open an issue on the [GitHub repository](https://github.com/tmc/nvcf/issues). +For issues, feature requests, or questions, please open an issue on the [GitHub repository](https://github.com/brevdev/nvcf/issues). -For more information about NVIDIA Cloud Functions, visit the [official documentation](https://docs.nvidia.com/cloud-functions/) \ No newline at end of file +For more information about NVIDIA Cloud Functions, visit the [official documentation](https://docs.nvidia.com/cloud-functions/) diff --git a/cmd/auth.go b/cmd/auth.go index 169e97d..dce9b47 100644 --- a/cmd/auth.go +++ b/cmd/auth.go @@ -4,9 +4,9 @@ import ( "os/exec" "strings" + "github.com/brevdev/nvcf/config" + "github.com/brevdev/nvcf/output" "github.com/spf13/cobra" - "github.com/tmc/nvcf/config" - "github.com/tmc/nvcf/output" ) func AuthCmd() *cobra.Command { diff --git a/cmd/function.go b/cmd/function.go index 09bba83..ce80266 100644 --- a/cmd/function.go +++ b/cmd/function.go @@ -4,11 +4,11 @@ import ( "fmt" "os" + "github.com/brevdev/nvcf/api" + "github.com/brevdev/nvcf/config" + "github.com/brevdev/nvcf/output" "github.com/spf13/cobra" "github.com/tmc/nvcf-go" - "github.com/tmc/nvcf/api" - "github.com/tmc/nvcf/config" - "github.com/tmc/nvcf/output" ) func FunctionCmd() *cobra.Command { diff --git a/cmd/function_create.go b/cmd/function_create.go index 6926e23..a9ab270 100644 --- a/cmd/function_create.go +++ b/cmd/function_create.go @@ -3,11 +3,11 @@ package cmd import ( "fmt" + "github.com/brevdev/nvcf/api" + "github.com/brevdev/nvcf/config" + "github.com/brevdev/nvcf/output" "github.com/spf13/cobra" "github.com/tmc/nvcf-go" - "github.com/tmc/nvcf/api" - "github.com/tmc/nvcf/config" - "github.com/tmc/nvcf/output" ) func functionCreateCmd() *cobra.Command { diff --git a/go.mod b/go.mod index 11bc991..56570c2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/tmc/nvcf +module github.com/brevdev/nvcf go 1.22.5 @@ -6,7 +6,7 @@ require ( github.com/fatih/color v1.17.0 github.com/olekukonko/tablewriter v0.0.5 github.com/spf13/cobra v1.8.1 - github.com/tmc/nvcf-go v0.1.0-alpha.1 + github.com/tmc/nvcf-go v0.1.0-alpha.2 ) require ( diff --git a/go.sum b/go.sum index 269f2c9..088c4b2 100644 --- a/go.sum +++ b/go.sum @@ -31,6 +31,8 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/tmc/nvcf-go v0.1.0-alpha.1 h1:zMeJF4lIfl2/k+YS38ofPrMhhmmYxzindf2MJ1djftY= github.com/tmc/nvcf-go v0.1.0-alpha.1/go.mod h1:M9raLLBCc/qfx6iy8b42LlT/sU5rmhUEe6xkqxc8KKA= +github.com/tmc/nvcf-go v0.1.0-alpha.2 h1:KVCmVO1Ac+DGtfDYAg4SiKjc38ucfKFXSqN1NZdH7TI= +github.com/tmc/nvcf-go v0.1.0-alpha.2/go.mod h1:M9raLLBCc/qfx6iy8b42LlT/sU5rmhUEe6xkqxc8KKA= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= diff --git a/main.go b/main.go index 3045ad9..4f7a776 100644 --- a/main.go +++ b/main.go @@ -4,8 +4,8 @@ import ( "fmt" "os" + "github.com/brevdev/nvcf/cmd" "github.com/spf13/cobra" - "github.com/tmc/nvcf/cmd" ) func main() {