File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 33set -euv -o pipefail
44
55root=/home/ubuntu
6+ binary_path=$root /playground-artifacts/ui
67
78# Get new docker images
89$root /rust-playground/compiler/fetch.sh
910
1011# Clean old docker images
1112docker system prune -f || true
1213
14+ # Get the binary's hash so we know if it has changed
15+ previous_binary_hash=" "
16+ if [[ -f " ${binary_path} " ]]; then
17+ previous_binary_hash=$( md5sum " ${binary_path} " )
18+ fi
19+
1320# Get new artifacts
1421aws s3 sync --region=us-east-2 s3://playground-artifacts-i32 $root /playground-artifacts
1522# These artifacts don't change names and might stay the same size
@@ -23,8 +30,10 @@ aws s3 sync \
2330 --include=build/robots.txt \
2431 --exact-timestamps \
2532 s3://playground-artifacts-i32 $root /playground-artifacts
26- chmod +x $root /playground-artifacts/ui
33+ chmod +x " ${binary_path} "
2734
2835# Restart to get new server binary
29- sudo service playground stop || true
30- sudo service playground start
36+ if [[ -z " ${previous_binary_hash} " ]] || ! md5sum -c <( echo " ${previous_binary_hash} " ) --status; then
37+ sudo service playground stop || true
38+ sudo service playground start
39+ fi
You can’t perform that action at this time.
0 commit comments