feat: initialize Go agent module with config, Makefile and project structure
This commit is contained in:
17
Agent/Makefile
Normal file
17
Agent/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
.PHONY: build build-windows build-linux clean
|
||||
|
||||
BINARY=nexus-agent
|
||||
VERSION=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
||||
LDFLAGS=-ldflags "-s -w -X main.version=$(VERSION)"
|
||||
|
||||
build:
|
||||
go build $(LDFLAGS) -o bin/$(BINARY) ./cmd/agent
|
||||
|
||||
build-windows:
|
||||
GOOS=windows GOARCH=amd64 go build $(LDFLAGS) -o bin/$(BINARY).exe ./cmd/agent
|
||||
|
||||
build-linux:
|
||||
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o bin/$(BINARY)-linux ./cmd/agent
|
||||
|
||||
clean:
|
||||
rm -rf bin/
|
||||
Reference in New Issue
Block a user