Skip to content

Commit acd1f12

Browse files
build: ensure bin directory exists and disable CGO for tests
- Added 'mkdir -p bin' to the build target to prevent failure if the directory is missing. - Set 'CGO_ENABLED=0' in the test target to ensure consistency with the build environment.
1 parent 77ec9fd commit acd1f12

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ BINARY_NAME=sysmetrics-mcp
44
INSTALL_PATH=/usr/local/bin
55

66
build:
7+
mkdir -p bin
78
CGO_ENABLED=0 go build -o bin/$(BINARY_NAME) ./cmd/sysmetrics-mcp
89

910
clean:
@@ -18,7 +19,7 @@ uninstall:
1819
sudo rm -f $(INSTALL_PATH)/$(BINARY_NAME)
1920

2021
test:
21-
go test -v ./...
22+
CGO_ENABLED=0 go test -v ./...
2223

2324
fmt:
2425
go fmt ./...

0 commit comments

Comments
 (0)