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 3
3
set -euv -o pipefail
4
4
5
5
root=/home/ubuntu
6
+ binary_path=$root /playground-artifacts/ui
6
7
7
8
# Get new docker images
8
9
$root /rust-playground/compiler/fetch.sh
9
10
10
11
# Clean old docker images
11
12
docker system prune -f || true
12
13
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
+
13
20
# Get new artifacts
14
21
aws s3 sync --region=us-east-2 s3://playground-artifacts-i32 $root /playground-artifacts
15
22
# These artifacts don't change names and might stay the same size
@@ -23,8 +30,10 @@ aws s3 sync \
23
30
--include=build/robots.txt \
24
31
--exact-timestamps \
25
32
s3://playground-artifacts-i32 $root /playground-artifacts
26
- chmod +x $root /playground-artifacts/ui
33
+ chmod +x " ${binary_path} "
27
34
28
35
# 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