diff --git a/build_mcd_mainnet.sh b/build_mcd_mainnet.sh index bf32f95..254e4b3 100755 --- a/build_mcd_mainnet.sh +++ b/build_mcd_mainnet.sh @@ -2,6 +2,8 @@ set -e +cp install_new_protoc.sh mobilecoin/ + pushd mobilecoin export GIT_REV=`git rev-parse HEAD` @@ -12,13 +14,11 @@ cargo clean export NETWORK="prod.mobilecoin.com" echo "NETWORK = ${NETWORK}" -source ./tools/download_sigstruct.sh -export SGX_MODE=HW -export IAS_MODE=PROD - echo "Building mobilecoind" -cargo build --release --locked -p mc-mobilecoind -p mc-admin-http-gateway +./mob --verbose --no-publish --hw --ias-prod --env="NETWORK=${NETWORK}" "source ./tools/download_sigstruct.sh; sudo ./install_new_protoc.sh; cargo build --release --locked -p mc-mobilecoind -p mc-admin-http-gateway" + +rm install_new_protoc.sh export ARTIFACTS=/tmp/mobilecoind-mainnet-package echo "Bundling artifacts at ${ARTIFACTS}" @@ -26,8 +26,8 @@ echo "Bundling artifacts at ${ARTIFACTS}" rm -rf ${ARTIFACTS} mkdir -p ${ARTIFACTS}/bin -cp target/release/mobilecoind ${ARTIFACTS}/bin/ -cp target/release/mc-admin-http-gateway ${ARTIFACTS}/bin/ +cp target/docker/release/mobilecoind ${ARTIFACTS}/bin/ +cp target/docker/release/mc-admin-http-gateway ${ARTIFACTS}/bin/ cp ingest-enclave.css ${ARTIFACTS}/bin/ cp consensus-enclave.css ${ARTIFACTS}/bin/ cat << EOF > "${ARTIFACTS}/README.md" diff --git a/build_mcd_testnet.sh b/build_mcd_testnet.sh index c29778a..b0e659b 100755 --- a/build_mcd_testnet.sh +++ b/build_mcd_testnet.sh @@ -2,6 +2,8 @@ set -e +cp install_new_protoc.sh mobilecoin/ + pushd mobilecoin export GIT_REV=`git rev-parse HEAD` @@ -12,13 +14,11 @@ cargo clean export NETWORK="test.mobilecoin.com" echo "NETWORK = ${NETWORK}" -source ./tools/download_sigstruct.sh -export SGX_MODE=HW -export IAS_MODE=PROD - echo "Building mobilecoind" -cargo build --release --locked -p mc-mobilecoind -p mc-admin-http-gateway +./mob --verbose --no-publish --hw --ias-prod --env="NETWORK=${NETWORK}" "source ./tools/download_sigstruct.sh; sudo ./install_new_protoc.sh; cargo build --release --locked -p mc-mobilecoind -p mc-admin-http-gateway" + +rm install_new_protoc.sh export ARTIFACTS=/tmp/mobilecoind-testnet-package echo "Bundling artifacts at ${ARTIFACTS}" @@ -26,8 +26,8 @@ echo "Bundling artifacts at ${ARTIFACTS}" rm -rf ${ARTIFACTS} mkdir -p ${ARTIFACTS}/bin -cp target/release/mobilecoind ${ARTIFACTS}/bin/ -cp target/release/mc-admin-http-gateway ${ARTIFACTS}/bin/ +cp target/docker/release/mobilecoind ${ARTIFACTS}/bin/ +cp target/docker/release/mc-admin-http-gateway ${ARTIFACTS}/bin/ cp ingest-enclave.css ${ARTIFACTS}/bin/ cp consensus-enclave.css ${ARTIFACTS}/bin/ cat << EOF > "${ARTIFACTS}/README.md" diff --git a/install_new_protoc.sh b/install_new_protoc.sh new file mode 100755 index 0000000..5143c4c --- /dev/null +++ b/install_new_protoc.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "Installing new protoc" + +set -ex + +cd /tmp +apt update +apt install unzip +wget https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip +unzip protoc-25.2-linux-x86_64.zip +cp bin/protoc /usr/bin/protoc