This is an automated email from the ASF dual-hosted git repository.
ccondit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-web.git
The following commit(s) were added to refs/heads/master by this push:
new 7b9ad0d [YUNIKORN-1927] Fix make failures (#132)
7b9ad0d is described below
commit 7b9ad0d28d06df6389f6fa015c6e43a72a2efffb
Author: Wilfred Spiegelenburg <[email protected]>
AuthorDate: Tue Aug 22 10:06:05 2023 -0500
[YUNIKORN-1927] Fix make failures (#132)
- Create output directory as part of test_go
- Use find to check for dependencies instead of directory
- Remove editor config that interferes with go file layout in IDE
Closes: #132
Signed-off-by: Craig Condit <[email protected]>
---
.editorconfig | 13 -------------
Makefile | 7 ++++---
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index e89330a..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-# Editor configuration, see https://editorconfig.org
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 2
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-[*.md]
-max_line_length = off
-trim_trailing_whitespace = false
diff --git a/Makefile b/Makefile
index 263728b..993e294 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ ifeq ($(GO),)
GO := go
endif
-GO_VERSION := $(shell "$(GO)" version | awk '{print substr($$3, 3, 10)}')
+GO_VERSION := $(shell "$(GO)" version | awk '{print substr($$3, 3, 4)}')
MOD_VERSION := $(shell cat .go_version)
GM := $(word 1,$(subst ., ,$(GO_VERSION)))
@@ -169,6 +169,7 @@ test_js: build
# Run Go unit tests
.PHONY: test_go
test_go:
+ @mkdir -p "$(OUTPUT)"
"$(GO)" clean -testcache
"$(GO)" test ./pkg/... -cover -race -tags deadlock
-coverprofile=build/coverage.txt -covermode=atomic
"$(GO)" vet $(REPO)...
@@ -209,7 +210,7 @@ image: $(RELEASE_BIN_DIR)/$(SERVER_BINARY)
.PHONY: build_server_dev
build_server_dev: $(DEV_BIN_DIR)/$(SERVER_BINARY)
-$(DEV_BIN_DIR)/$(SERVER_BINARY): go.mod go.sum pkg
+$(DEV_BIN_DIR)/$(SERVER_BINARY): go.mod go.sum $(shell find pkg)
@echo "building local web server binary"
@mkdir -p "${DEV_BIN_DIR}"
"$(GO)" build -o=${DEV_BIN_DIR}/${SERVER_BINARY} -race -ldflags \
@@ -219,7 +220,7 @@ $(DEV_BIN_DIR)/$(SERVER_BINARY): go.mod go.sum pkg
.PHONY: build_server_prod
build_server_prod: $(RELEASE_BIN_DIR)/$(SERVER_BINARY)
-$(RELEASE_BIN_DIR)/$(SERVER_BINARY): go.mod go.sum pkg
+$(RELEASE_BIN_DIR)/$(SERVER_BINARY): go.mod go.sum $(shell find pkg)
@echo "building web server binary"
@mkdir -p ${RELEASE_BIN_DIR}
CGO_ENABLED=0 GOOS=linux GOARCH="${EXEC_ARCH}" \
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]