Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit 00ffe4c

Browse files
committed
Add Makefile for tas-installer
1 parent 1160143 commit 00ffe4c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
CHART_VERSION ?= ""
3+
CHART_URL ?= "./charts/trusted-artifact-signer"
4+
5+
LDFLAGS=-X securesign/sigstore-ocp/tas-installer/cmd.helmChartVersion=$(CHART_VERSION) \
6+
-X securesign/sigstore-ocp/tas-installer/cmd.helmChartUrl=$(CHART_URL)
7+
8+
PLATFORMS=darwin linux windows
9+
ARCHITECTURES=amd64 arm64
10+
11+
.PHONY: build
12+
build: build-tas-installer
13+
14+
.PHONY: test
15+
test: test-tas-installer
16+
17+
.PHONY: cross
18+
cross: cross-tas-installer
19+
20+
.PHONY: build-tas-installer
21+
build-tas-installer:
22+
CGO_ENABLED=0 go build -C ./tas-installer -trimpath -ldflags "$(LDFLAGS)" -o ../tas-install
23+
24+
.PHONY: test-tas-installer
25+
test-tas-installer:
26+
cd ./tas-installer && go test ./...
27+
28+
.PHONY: cross-tas-installer
29+
cross-tas-installer:
30+
$(foreach GOOS, $(PLATFORMS),\
31+
$(foreach GOARCH, $(ARCHITECTURES), $(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); \
32+
go build -C ./tas-installer -trimpath -ldflags "$(LDFLAGS)" -o ../tas-install-$(GOOS)-$(GOARCH))))
33+
34+
.PHONY: clean
35+
clean:
36+
rm -f tas-install
37+
rm -f tas-install-*

0 commit comments

Comments
 (0)