From ba5ccfeeabb0064c36c83484003fe0e4745ce5dc Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Fri, 5 Apr 2024 16:23:27 +0200 Subject: [PATCH] Add gitignore file Signed-off-by: Carlos Eduardo Arango Gutierrez --- .gitignore | 1 + Makefile | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7556a43 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +cc-manager diff --git a/Makefile b/Makefile index e42e73d..48448cd 100644 --- a/Makefile +++ b/Makefile @@ -12,20 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. +GO_CMD ?= go +GO_FMT ?= gofmt +GO_SRC := $(shell find . -type f -name '*.go' -not -path "./vendor/*") + +BINARY_NAME ?= cc-manager build: - go build -o cc-manager ./... + ${GO_CMD} build -o ${BINARY_NAME} ./... test: - go test ./... + ${GO_CMD} test ./... vendor: - go mod tidy - go mod vendor - go mod verify + ${GO_CMD} mod tidy + ${GO_CMD} mod vendor + ${GO_CMD} mod verify check-vendor: vendor git diff --quiet HEAD -- go.mod go.sum vendor -.PHONY: vendor check-vendor - +.PHONY: vendor check-vendor build test