forked from daydreaming-experiment/app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·32 lines (24 loc) · 976 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
if [ $# != 1 ]; then
echo "Usage: $(basename $0) <version-number>"
exit 1
fi
version=$1
echo "##"
echo "## Copying daydreaming-{production,beta}-$version+release.apk to server"
echo "##"
echo
rsync -vhP daydreaming/daydreaming-production-$version+release.apk [email protected]:daydreaming/srv/releases/
rsync -vhP daydreaming/daydreaming-beta-$version+release.apk [email protected]:daydreaming/srv/releases/
echo
echo "##"
echo "## Setting symlinks for daydreaming-{production,beta}-latest.apk on server"
echo "##"
echo
ssh [email protected] "cd daydreaming/srv/releases; unlink daydreaming-production-latest.apk; ln -s daydreaming-production-$version+release.apk daydreaming-production-latest.apk"
ssh [email protected] "cd daydreaming/srv/releases; unlink daydreaming-beta-latest.apk; ln -s daydreaming-beta-$version+release.apk daydreaming-beta-latest.apk"
echo "##"
echo "## All done!"
echo "##"
echo