Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PKCS11 tag in releaser and Makefile for Mac and Windows #1052

Merged
merged 3 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ builds:
env:
- CGO_ENABLED=0

- id: linux-pivkey-amd64
binary: cosign-linux-pivkey-amd64
- id: linux-pivkey-pkcs11key-amd64
binary: cosign-linux-pivkey-pkcs11key-amd64
main: ./cmd/cosign
flags:
- -trimpath
Expand All @@ -47,28 +47,14 @@ builds:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key
hooks:
pre:
- apt-get update
- apt-get -y install libpcsclite-dev
env:
- PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/"

- id: linux-pkcs11key-amd64
binary: cosign-linux-pkcs11key-amd64
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
goarch:
- amd64
ldflags:
- "{{ .Env.LDFLAGS }}"
tags:
- pkcs11key

- id: darwin-amd64
binary: cosign-darwin-amd64
no_unique_dist_dir: true
Expand All @@ -87,6 +73,7 @@ builds:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key

- id: darwin-arm64
binary: cosign-darwin-arm64
Expand All @@ -103,6 +90,7 @@ builds:
- arm64
tags:
- pivkey
- pkcs11key
ldflags:
- "{{.Env.LDFLAGS}}"

Expand All @@ -125,6 +113,7 @@ builds:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key

- id: linux-cosigned
binary: cosigned-linux-{{ .Arch }}
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,8 @@ fmt: ## Format all go files
cosign: $(SRCS)
CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ ./cmd/cosign

cosign-pivkey: $(SRCS)
CGO_ENABLED=1 go build -trimpath -tags=pivkey -ldflags "$(LDFLAGS)" -o cosign ./cmd/cosign

cosign-pkcs11key: $(SRCS)
CGO_ENABLED=1 go build -trimpath -tags=pkcs11key -ldflags "$(LDFLAGS)" -o cosign ./cmd/cosign
cosign-pivkey-pkcs11key: $(SRCS)
CGO_ENABLED=1 go build -trimpath -tags=pivkey,pkcs11key -ldflags "$(LDFLAGS)" -o cosign ./cmd/cosign

.PHONY: cosigned
cosigned: ## Build cosigned binary
Expand Down