try to sign (#137)

Co-authored-by: Chris Rizzitello <crizzitello@ics.com>
main
crizzitello 2022-04-25 14:50:57 -04:00 committed by GitHub
parent 79c3320105
commit 9ca742b306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -42,7 +42,10 @@ on run argv
set position of item "ashirt.app" to { 0, 225 }
set position of item "README.MD" to { 250, 0 }
set position of item "Applications" to { 500, 225 }
try
do shell script "codesign -v -f --timestamp --options runtime --sign \"$(cat deploy/NOTARIZE_AS)\" /Volumes/" & image_name & "/ashirt.app/Contents/MacOS/ashirt"
do shell script "codesign -v -f --timestamp --options runtime --sign \"$(cat deploy/NOTARIZE_AS)\" /Volumes/" & image_name & "/ashirt.app/Contents/Frameworks/libbrotlicommon.1.dylib"
end try
end tell
delay 5
close

View File

@ -67,11 +67,14 @@ if(APPLE)
)
else()
message(STATUS "Sign Bundle As: ${NOTARIZE_AS}")
set(HOMEBREW_CELLAR "/usr/local/Cellar")
if(EXISTS /opt/homebrew/Cellar)
set(HOMEBREW_CELLAR "/opt/homebrew/Cellar")
endif()
add_custom_command(
TARGET ashirt POST_BUILD
COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/ashirt.app/Contents/Frameworks
COMMAND cp /usr/local/Cellar/brotli/1.0.9/lib/libbrotlicommon.1.0.9.dylib ${CMAKE_CURRENT_BINARY_DIR}/ashirt.app/Contents/Frameworks/libbrotlicommon.1.dylib
COMMAND codesign -v --timestamp --sign ${NOTARIZE_AS} ${CMAKE_CURRENT_BINARY_DIR}/ashirt.app/Contents/Frameworks/libbrotlicommon.1.dylib
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/ashirt.app/Contents/Frameworks
COMMAND install ${HOMEBREW_CELLAR}/brotli/1.0.9/lib/libbrotlicommon.1.0.9.dylib ${CMAKE_CURRENT_BINARY_DIR}/ashirt.app/Contents/Frameworks/libbrotlicommon.1.dylib
COMMAND ${PLATFORMDEPLOYQT} ${CMAKE_CURRENT_BINARY_DIR}/ashirt.app -sign-for-notarization=${NOTARIZE_AS}
)
endif()