Skip to content

Commit 412c961

Browse files
staticfloatKristofferC
authored andcommitted
macOS codesigning: only attempt if $MACOS_CODESIGN_IDENTITY is set (#33228)
This has the following advantages: * It allows our buildbots to pass in which code signing identity they want to use (rather than having the identity hash hardcoded in our build system) * It stops blindly attempting to codesign on random user's machines * It causes codesign failure to stop the build (cherry picked from commit 0760842)
1 parent 4e5f01c commit 412c961

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

contrib/mac/app/Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ dmg/$(APP_NAME): startup.applescript julia.icns
4949
-mkdir -p $@/Contents/Resources/julia
5050
make -C $(JULIAHOME) binary-dist
5151
tar zxf $(JULIAHOME)/$(JULIA_BINARYDIST_FILENAME).tar.gz -C $@/Contents/Resources/julia --strip-components 1
52-
-codesign -s "AFB379C0B4CBD9DB9A762797FC2AB5460A2B0DBE" --deep $@
52+
if [ -n "$$MACOS_CODESIGN_IDENTITY" ]; then \
53+
echo "Codesigning with identity $$MACOS_CODESIGN_IDENTITY"; \
54+
codesign -s "$$MACOS_CODESIGN_IDENTITY" -v --deep $@; \
55+
else \
56+
true; \
57+
fi
5358

5459
ROOTFILES := $(shell ls -ld dmg/*.app *.dmg 2> /dev/null | awk '{print $$3}')
5560
clean:

0 commit comments

Comments
 (0)