Skip to content

Commit

Permalink
Add PKCS11 tag in releaser and Makefile for Mac and Windows (#1052)
Browse files Browse the repository at this point in the history
* Add PKCS11 tag in releaser and Makefile for Mac and Windows.

Signed-off-by: Kieran Miller <kieran.miller@garantir.io>

* Merge PIV and PKCS#11 releases into one

Signed-off-by: Kieran Miller <kieran.miller@garantir.io>
  • Loading branch information
garantir-km committed Nov 17, 2021
1 parent 413d06e commit d673477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
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

0 comments on commit d673477

Please sign in to comment.