forked from EHRI/TeiEditions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·33 lines (28 loc) · 1020 Bytes
/
release.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
33
#!/bin/bash
# Very hacky release script to build the dist files and copy them
# to the target production and staging Omeka sites.
set -e
MODE=$1
# source the config file
. ./release-config.sh
if [ "$MODE" == "stage" ]; then
for site in ${STAGE_SITES[@]} ; do
for host in ${STAGE_HOSTS[@]} ; do
echo "Releasing to $site.$STAGE_DOMAIN"
rsync -avlz \
--exclude .idea --exclude node_modules --exclude 'release*' --exclude .git --exclude test \
. $host:/var/www/$site.$STAGE_DOMAIN/plugins/TeiEditions/
done
done
elif [ "$MODE" == "prod" ]; then
for site in ${PROD_SITES[@]} ; do
for host in ${PROD_HOSTS[@]} ; do
echo "Releasing to $site.$PROD_DOMAIN"
rsync -avlz \
--exclude .idea --exclude node_modules --exclude 'release*' --exclude .git --exclude test \
. $host:/var/www/$site.$PROD_DOMAIN/plugins/TeiEditions/
done
done
else
echo "No mode given!"
fi