Skip to content

Commit

Permalink
Automate codesign
Browse files Browse the repository at this point in the history
(cherry picked from commit 0d9c815)
  • Loading branch information
LEOYoon-Tsaw committed Nov 29, 2021
1 parent f926c8f commit 2e6fcff
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,15 @@ clean-sparkle:
.PHONY: package archive sign-archive

package: release
ifdef DEV_ID
package/sign.bash $(DEV_ID)
endif
bash package/make_package
ifdef DEV_ID
productsign --sign "Developer ID Installer: $(DEV_ID)" package/Squirrel.pkg package/Squirrel-signed.pkg
rm package/Squirrel.pkg
mv package/Squirrel-signed.pkg package/Squirrel.pkg
endif

archive: package
bash package/make_archive
Expand Down
15 changes: 15 additions & 0 deletions package/sign.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
appDir="build/Release/Squirrel.app"

allFiles=$(find "$appDir" -print)
for file in $allFiles; do
if ! [[ -d "$file" ]]; then
if [[ -x "$file" ]]; then
echo "$file"
codesign --force --options runtime --timestamp --sign "Developer ID Application: $1" "$file";
fi;
fi;
done;

codesign --force --options runtime --timestamp --sign "Developer ID Application: $1" "$appDir";

spctl -a -vv "$appDir";

0 comments on commit 2e6fcff

Please sign in to comment.