Skip to content

Commit c643e27

Browse files
authored
fix: Mainnet release script (#203)
1 parent 638c9e7 commit c643e27

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.codebuild/build.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ deploy_hathor_network_account() {
6666
send_slack_message "New version deployed to mainnet-staging: ${GIT_REF_TO_DEPLOY}"
6767
elif expr "${GIT_REF_TO_DEPLOY}" : "v.*" >/dev/null; then
6868
echo $GIT_REF_TO_DEPLOY > /tmp/docker_image_tag
69-
make build-daemon;
7069

7170
# --- Testnet ---
7271
# Gets all env vars with `testnet_` prefix and re-exports them without the prefix
@@ -75,29 +74,35 @@ deploy_hathor_network_account() {
7574
done
7675

7776
make migrate;
77+
make build-daemon;
7878
make deploy-lambdas-testnet;
79+
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
80+
make push-daemon;
7981

8082
# Unsets all the testnet env vars so we make sure they don't leak to other deploys
8183
for var in "${!testnet_@}"; do
8284
unset ${var#testnet_}
8385
done
8486

87+
send_slack_message "New version deployed to testnet-production: ${GIT_REF_TO_DEPLOY}"
88+
8589
# --- Mainnet ---
8690
# Gets all env vars with `mainnet_` prefix and re-exports them without the prefix
8791
for var in "${!mainnet_@}"; do
8892
export ${var#mainnet_}="${!var}"
8993
done
9094
make migrate;
95+
make build-daemon;
9196
make deploy-lambdas-mainnet;
97+
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
98+
make push-daemon;
9299

93100
# Unsets all the mainnet env vars so we make sure they don't leak to other deploys
94101
for var in "${!mainnet_@}"; do
95102
unset ${var#mainnet_}
96103
done
97104

98-
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
99-
make push-daemon;
100-
send_slack_message "New version deployed to testnet-production and mainnet-production: ${GIT_REF_TO_DEPLOY}"
105+
send_slack_message "New version deployed to mainnet-production: ${GIT_REF_TO_DEPLOY}"
101106
else
102107
# Gets all env vars with `dev_` prefix and re-exports them without the prefix
103108
for var in "${!dev_@}"; do

scripts/push-daemon.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
set -e
22
set -o pipefail
33

4+
if [ -z "$ACCOUNT_ID" ]; then
5+
echo "Please export a ACCOUNT_ID env var before running this";
6+
exit 1;
7+
fi
8+
49
DOCKER_IMAGE_TAG=$(cat /tmp/docker_image_tag)
510

611
if [ -z "$DOCKER_IMAGE_TAG" ]; then

0 commit comments

Comments
 (0)