github.com/loomnetwork/gamechain@v0.0.0-20200406110549-36c47eb97a92/upload.sh (about) 1 #!/bin/bash 2 3 set -ex 4 5 cd ${WORKSPACE}/src/github.com/loomnetwork/gamechain 6 7 if [ "${BRANCH}" = "master" ]; then 8 gsutil cp bin/zb-cli gs://private.delegatecall.com/zombie_battleground/linux/latest/zb-cli 9 fi 10 gsutil cp bin/zb-cli gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/zb-cli 11 12 if [ -f "contracts/zombiebattleground.1.0.0" ]; then 13 if [ "${BRANCH}" = "master" ]; then 14 gsutil cp contracts/zombiebattleground.1.0.0 gs://private.delegatecall.com/zombie_battleground/linux/latest/zombiebattleground.1.0.0 15 fi 16 gsutil cp contracts/zombiebattleground.1.0.0 gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/zombiebattleground.1.0.0 17 fi 18 19 if [ -f "contracts/zombiebattleground.so.1.0.0" ]; then 20 if [ "${BRANCH}" = "master" ]; then 21 gsutil cp contracts/zombiebattleground.so.1.0.0 gs://private.delegatecall.com/zombie_battleground/linux/latest/zombiebattleground.so.1.0.0 22 fi 23 gsutil cp contracts/zombiebattleground.so.1.0.0 gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/zombiebattleground.so.1.0.0 24 fi 25 26 # Since the repository is not public, we need the genesis copied to storage so that we can deploy 27 if [ "${BRANCH}" = "master" ]; then 28 gsutil cp zb.genesis.json gs://private.delegatecall.com/zombie_battleground/linux/latest/genesis.json 29 fi 30 gsutil cp zb.genesis.json gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/genesis.json 31 32 if [ "${BRANCH}" = "master" ]; then 33 gsutil cp zb.genesis.json gs://private.delegatecall.com/zombie_battleground/linux/latest/genesis.json.v1 34 fi 35 gsutil cp zb.genesis.json gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/genesis.json.v1 36 37 if [ "${BRANCH}" = "master" ]; then 38 gsutil cp zb.v2.genesis.json gs://private.delegatecall.com/zombie_battleground/linux/latest/genesis.json.v2 39 fi 40 gsutil cp zb.v2.genesis.json gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/genesis.json.v2 41 42 # Custom loom 43 if [ "${BRANCH}" = "master" ]; then 44 gsutil cp ${WORKSPACE}/bin/loom gs://private.delegatecall.com/zombie_battleground/linux/latest/loom 45 fi 46 gsutil cp ${WORKSPACE}/bin/loom gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/loom 47 48 # Custom gamechain 49 if [ "${BRANCH}" = "master" ]; then 50 gsutil cp ${WORKSPACE}/bin/gamechain gs://private.delegatecall.com/zombie_battleground/linux/latest/gamechain 51 fi 52 gsutil cp ${WORKSPACE}/bin/gamechain gs://private.delegatecall.com/zombie_battleground/linux/build-${BUILD_NUMBER}/gamechain