From 2a3f7a44686ff93ca42ab179828f02f908ad0cd6 Mon Sep 17 00:00:00 2001 From: Jean-Laurent de Morlhon Date: Fri, 3 Mar 2017 16:20:29 +0100 Subject: [PATCH] Add a makefile target to codesign output binary on macOS Signed-off-by: Jean-Laurent de Morlhon --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 58128f3..ea331ce 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,12 @@ deps: osxkeychain: mkdir -p bin - go build -o bin/docker-credential-osxkeychain osxkeychain/cmd/main_darwin.go + go build -ldflags -s -o bin/docker-credential-osxkeychain osxkeychain/cmd/main_darwin.go + +codesign: osxkeychain + $(eval SIGNINGHASH = $(shell security find-identity -v -p codesigning | grep "Developer ID Application: Docker Inc" | cut -d ' ' -f 4)) + xcrun -log codesign -s $(SIGNINGHASH) --force --verbose bin/docker-credential-osxkeychain + xcrun codesign --verify --deep --strict --verbose=2 --display bin/docker-credential-osxkeychain secretservice: mkdir -p bin