Skip to content

Commit

Permalink
build: use codesign -f
Browse files Browse the repository at this point in the history
Running 'make' twice currently results in an error:

```
% make
CGO_ENABLED=1 CGO_CFLAGS=-mmacosx-version-min=11.0 GOOS=darwin GOARCH=amd64 go build -o out/vfkit-amd64 ./cmd/vfkit
codesign --entitlements vf.entitlements -s - out/vfkit-amd64
out/vfkit-amd64: is already signed
make: *** [out/vfkit-amd64] Error 1
```

This commit makes use of "codesign -f" to force the re-generation of a
signature even if the binarie did not change. This works around the
previous error.
  • Loading branch information
cfergeau committed Jan 23, 2024
1 parent dba7abb commit 46ce615
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ clean:
out/vfkit-amd64 out/vfkit-arm64: out/vfkit-%: force-build
@mkdir -p $(@D)
CGO_ENABLED=1 CGO_CFLAGS=$(CGO_CFLAGS) GOOS=darwin GOARCH=$* go build -o $@ ./cmd/vfkit
codesign --entitlements vf.entitlements -s - $@
codesign -f --entitlements vf.entitlements -s - $@

out/vfkit: out/vfkit-amd64 out/vfkit-arm64
cd $(@D) && lipo -create $(^F) -output $(@F)
Expand Down

0 comments on commit 46ce615

Please sign in to comment.