forked from lukasvan3l/q42.nl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·41 lines (32 loc) · 1.13 KB
/
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
33
34
35
36
37
38
39
40
41
#!/bin/bash
# first run these two, when you got access to scalingo sites:
# git remote add scalingo-nl [email protected]:q42nl-site.git
# git remote add scalingo-en [email protected]:q42comsite.git
NOW=$(date +"%Y-%m-%d")
echo "------ Begin Q42.nl and Q42.com deploy! ------"
# Use git flow to tag this release with the current date (eg. 2015-03-21)
echo "--- Creating a release..."
git flow release start $NOW
git flow release finish $NOW
echo "--- New release $NOW created."
echo
# Publish all assets to the CDN rather than serving them from meteor.com
echo "--- Publishing assets to CDN..."
gcloud components update
gsutil -m rsync -r -d public gs://static.q42.nl || exit 1
echo "--- Done with CDN."
echo
# Deploy the site to two different Meteor domains
# so we have an English and a Dutch website :-)
echo "--- Deploying to q42.com..."
git push scalingo-en master
echo "--- Done deploying to q42.com. Refresh your browser!"
echo
echo "--- Deploying to q42.nl..."
git push scalingo-nl master
echo "--- Done deploying to q42.nl. Refresh your browser!"
echo
echo "--- Returning to develop branch..."
git checkout develop
echo
echo "------ Done. ------"