Major Refactoring, Client can now be used as a library
Some checks failed
Build (artifact) / build (push) Failing after 1m3s
Some checks failed
Build (artifact) / build (push) Failing after 1m3s
This commit is contained in:
25
Makefile
25
Makefile
@@ -4,17 +4,32 @@ BUILD := $(shell git rev-parse --short HEAD)
|
||||
GO := go
|
||||
|
||||
BUILD_FLAGS := -buildmode=pie -trimpath
|
||||
LDFLAGS := -linkmode=external -extldflags="-Wl,-z,relro,-z,now" -X git.nevets.tech/Keys/CertManager/internal.Version=$(VERSION) -X git.nevets.tech/Keys/CertManager/internal.Build=$(BUILD)
|
||||
LDFLAGS := -linkmode=external -extldflags="-Wl,-z,relro,-z,now" -X git.nevets.tech/Keys/certman/common.Version=$(VERSION) -X git.nevets.tech/Keys/certman/common.Build=$(BUILD)
|
||||
|
||||
.PHONY: proto build debug stage
|
||||
.PHONY: proto bundle client server executor build debug stage
|
||||
|
||||
proto:
|
||||
@protoc --go_out=./proto --go-grpc_out=./proto proto/hook.proto
|
||||
@protoc --go_out=./proto --go-grpc_out=./proto proto/symlink.proto
|
||||
|
||||
build: proto
|
||||
$(GO) build $(BUILD_FLAGS) -ldflags="-s -w $(LDFLAGS)" -o ./certman .
|
||||
@cp ./certman ./certman-$(VERSION)-amd64
|
||||
bundle: proto
|
||||
@echo "Building Bundled Certman"
|
||||
$(GO) build $(BUILD_FLAGS) -ldflags="-s -w $(LDFLAGS)" -o ./bin/certman-$(VERSION)-amd64 ./cmd/bundle
|
||||
|
||||
client: proto
|
||||
@echo "Building Certman Client"
|
||||
$(GO) build $(BUILD_FLAGS) -ldflags="-s -w $(LDFLAGS)" -o ./bin/certman-client-$(VERSION)-amd64 ./cmd/client
|
||||
|
||||
server: proto
|
||||
@echo "Building Certman Server"
|
||||
$(GO) build $(BUILD_FLAGS) -ldflags="-s -w $(LDFLAGS)" -o ./bin/certman-server-$(VERSION)-amd64 ./cmd/server
|
||||
|
||||
executor: proto
|
||||
@echo "Building Certman Executor"
|
||||
$(GO) build $(BUILD_FLAGS) -ldflags="-s -w $(LDFLAGS)" -o ./bin/certman-executor-$(VERSION)-amd64 ./cmd/executor
|
||||
|
||||
build: proto bundle client server executor
|
||||
@echo "All binaries successfully built"
|
||||
|
||||
debug: proto
|
||||
$(GO) build $(BUILD_FLAGS) -ldflags="$(LDFLAGS)" -o ./certman .
|
||||
|
||||
Reference in New Issue
Block a user