-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build script and requirements
- Loading branch information
Showing
2 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
#!/bin/bash | ||
/opt/homebrew/bin/trash ./build ./dist | ||
/opt/homebrew/bin/trash ./test/AutoArchive.app | ||
# Apple Developer variables | ||
APPLE_ID=$(op read "op://Private/z4sp6gvcgzeejgvf6mufvqwrme/username") | ||
APP_PASSWORD=$(op read "op://Private/z4sp6gvcgzeejgvf6mufvqwrme/App Password/App Password") | ||
TEAM_ID=$(op read "op://Personal/z4sp6gvcgzeejgvf6mufvqwrme/Developer/Team ID") | ||
|
||
|
||
# if not exist ./test, create it | ||
if [ ! -d "./test" ]; then | ||
mkdir ./test | ||
fi | ||
trash ./build ./dist | ||
trash ./test/AutoArchive.app | ||
trash ./dist/AutoArchive.zip | ||
|
||
source ./venv/bin/activate | ||
|
||
python3 setup.py py2app | ||
|
||
# codesign | ||
CODESIGN_VARS="--deep --force --verify --verbose --timestamp --options runtime" | ||
# find .so under ./dist/AutoArchive.app/ | ||
find ./dist/AutoArchive.app/ -name "*.so" -exec codesign $CODESIGN_VARS -s "$TEAM_ID" {} \; | ||
codesign $CODESIGN_VARS -s "$TEAM_ID" ./dist/AutoArchive.app | ||
|
||
/usr/bin/ditto -c -k --keepParent ./dist/AutoArchive.app ./dist/AutoArchive.zip | ||
cp -R ./dist/AutoArchive.app ./test/AutoArchive.app | ||
|
||
# notarization | ||
read -p "Press enter to submit for Notarization" | ||
|
||
xcrun notarytool submit --apple-id $APPLE_ID --password $APP_PASSWORD --team-id $TEAM_ID --wait ./dist/AutoArchive.zip | ||
|
||
read -p "Press enter to Staple" | ||
|
||
xcrun stapler staple ./dist/AutoArchive.app | ||
spctl -vvv --assess --type exec ./dist/AutoArchive.app | ||
|
||
trash ./dist/AutoArchive.zip | ||
/usr/bin/ditto -c -k --keepParent ./dist/AutoArchive.app ./dist/AutoArchive.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
modulegraph~=0.19.6 | ||
py2app~=0.28.6 | ||
macholib~=1.16.3 | ||
setuptools~=69.0.3 | ||
altgraph~=0.17.4 | ||
py2app~=0.28.7 | ||
setuptools<70.0.0 |