-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from GadzeFinance/feature/sign-mac
Feature/sign mac
- Loading branch information
Showing
4 changed files
with
119 additions
and
45 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
DIST_PATH="dist/mac" | ||
APP_NAME="etherfi-desktop.app" | ||
PYTHON_EXECUTABLE_PATH="Contents/build/bin/eth2deposit_proxy" | ||
IDENTITY="Developer ID Application: Nicholas Khorasani (X8SBW73X92)" | ||
|
||
yarn dist --x64 | ||
|
||
echo Enter THESE: | ||
echo com.etherfi.etherfi-desktop | ||
echo usdx-hwwf-pdbp-karx | ||
xcrun notarytool store-credentials --apple-id "nckhorasani@icloud.com" --team-id "X8SBW73X92" | ||
|
||
ditto -c -k --sequesterRsrc --keepParent "$DIST_PATH/$APP_NAME" "$DIST_PATH/etherfi-desktop.zip" | ||
echo "101" | ||
xcrun notarytool submit "$DIST_PATH/etherfi-desktop.zip" --keychain-profile "com.etherfi.etherfi-desktop" --wait | ||
echo "102" | ||
stapler staple "$DIST_PATH/$APP_NAME" | ||
echo "103" | ||
spctl --assess -vv --type install "$DIST_PATH/$APP_NAME" | ||
echo "104" |
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
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Bash script to bundle the eth2deposit_proxy application and the associated required files on | ||
# Linux and macOS. | ||
|
||
if [ -f ~/.bash_aliases ]; then | ||
shopt -s expand_aliases | ||
source ~/.bash_aliases | ||
fi | ||
|
||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
echo $SCRIPTPATH | ||
EDCDIR=staking-deposit-cli-2.4.0 | ||
|
||
TARGETPACKAGESPATH=$SCRIPTPATH/../../dist/packages | ||
ETH2DEPOSITCLIPATH=$SCRIPTPATH/../vendors/$EDCDIR | ||
ETH2REQUIREMENTSPATH=$ETH2DEPOSITCLIPATH/requirements.txt | ||
|
||
PYTHONPATH=$TARGETPACKAGESPATH:$ETH2DEPOSITCLIPATH:$(python3 -c "import sys;print(':'.join(sys.path))") | ||
DISTBINPATH=$SCRIPTPATH/../../build/bin | ||
DISTWORDSPATH=$SCRIPTPATH/../../build/word_lists | ||
SRCWORDSPATH=$SCRIPTPATH/../vendors/$EDCDIR/staking_deposit/key_handling/key_derivation/word_lists | ||
SRCINTLPATH=$SCRIPTPATH/../vendors/$EDCDIR/staking_deposit/intl | ||
|
||
mkdir -p $DISTBINPATH | ||
mkdir -p $DISTWORDSPATH | ||
mkdir -p $TARGETPACKAGESPATH | ||
|
||
# Getting all the requirements | ||
python3 -m pip install -r $ETH2REQUIREMENTSPATH --target $TARGETPACKAGESPATH | ||
|
||
# Bundling Python eth2deposit_proxy | ||
PYTHONPATH=$PYTHONPATH pyinstaller \ | ||
--onefile \ | ||
--distpath $DISTBINPATH \ | ||
--add-data "$SRCINTLPATH:staking_deposit/intl" \ | ||
--target-architecture x86_64 \ | ||
--codesign-identity "Developer ID Application: Nicholas Khorasani (X8SBW73X92)" \ | ||
--osx-entitlements-file $SCRIPTPATH/../../AppleSetUp/entitlements.mac.plist \ | ||
-p $PYTHONPATH \ | ||
--hidden-import=os \ | ||
$SCRIPTPATH/eth2deposit_proxy.py | ||
|
||
# Adding word list | ||
cp $SRCWORDSPATH/* $DISTWORDSPATH |