Skip to content

Commit

Permalink
Narrow down the bin ignore to a specific file
Browse files Browse the repository at this point in the history
  • Loading branch information
pouneh committed Oct 7, 2022
1 parent 9ea01b0 commit b13fef4
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ dbml-error.log

__pycache__

*bin
tools/sgx_linux_x64_sdk_2.9.101.2.bin
Binary file added sgx_linux_x64_sdk_2.9.101.2.bin
Binary file not shown.
45 changes: 45 additions & 0 deletions tools/build-fs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
# Copyright (c) 2018-2022 The MobileCoin Foundation

# TODO: add a way to specify a different sigstruct directory

# Net can be main/test/local
if [ $# -eq 0 ]; then
NET="test"
else
NET=$1
fi

if [ $NET == "local" ]; then
echo "Local networks are not currently supported with this script"
exit 1
elif [ $NET == "test" ]; then
echo "Building Full Service with testnet settings"
NAMESPACE="test"
SM=SW
IM=DEV
elif [ $NET == "main" ]; then
NAMESPACE="prod"
SM=HW
IM=PROD
else
echo "Network specified is not valid. Try 'test' or 'main'. Default is test"
exit 1
fi

WORK_DIR="$HOME/.mobilecoin/${NET}"
WALLET_DB_DIR="${WORK_DIR}/wallet-db"
LEDGER_DB_DIR="${WORK_DIR}/ledger-db"
mkdir -p ${WORK_DIR}

CONSENSUS_ENCLAVE_CSS="$WORK_DIR/consensus-enclave.css"

(cd ${WORK_DIR} && CONSENSUS_SIGSTRUCT_URI=$(curl -s https://enclave-distribution.${NAMESPACE}.mobilecoin.com/production.json | grep consensus-enclave.css | awk '{print $2}' | tr -d \" | tr -d ,)
curl -O https://enclave-distribution.${NAMESPACE}.mobilecoin.com/${CONSENSUS_SIGSTRUCT_URI})

echo "building full service..."
SGX_MODE=$SM \
IAS_MODE=$IM \
CONSENSUS_ENCLAVE_CSS=$CONSENSUS_ENCLAVE_CSS \
cargo build --release -p mc-full-service

0 comments on commit b13fef4

Please sign in to comment.