Skip to content

Commit

Permalink
makefile update
Browse files Browse the repository at this point in the history
  • Loading branch information
pkazmierczak committed Jun 4, 2024
1 parent 48ad59e commit 08970a7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,22 @@ ifneq (,$(wildcard version/version_ent.go))
else
@$(CURDIR)/scripts/version.sh version/version.go version/version.go
endif

# CRT release compilation
dist/%/nomad-driver-exec2: GO_OUT ?= $@
dist/%/nomad-driver-exec2:
@echo "==> RELEASE BUILD of $@ ..."
GOOS=linux GOARCH=$(lastword $(subst _, ,$*)) \
go build -trimpath -o $(GO_OUT)

# CRT release packaging (zip only)
.PRECIOUS: dist/%/nomad-driver-exec2
dist/%.zip: dist/%/nomad-driver-exec2
@echo "==> RELEASE PACKAGING of $@ ..."
@cp LICENSE $(dir $<)LICENSE.txt
zip -j $@ $(dir $<)*

# CRT version generation
.PHONY: version
version:
@$(CURDIR)/version/generate.sh version/version.go version/version.go

0 comments on commit 08970a7

Please sign in to comment.