-
Notifications
You must be signed in to change notification settings - Fork 3
/
deploy
executable file
·36 lines (31 loc) · 859 Bytes
/
deploy
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
#!/bin/sh
#
# Deploy script for hosting tagged versions of the todos app on github.
#
# Simply run ./deploy and it will checkout gh-pages, update it's references
# and create a directory (and built app) for each tag.
#
git checkout gh-pages
git reset --hard origin/master
for tag in $(git tag);
do
git checkout $tag
echo "config :all, :required => :sproutcore,
:url_prefix => 'todos/$tag/static'" > Buildfile
rm -rf tmp
echo "Building todos/$tag..."
sc-build todos
build_number=$(sproutcore build-number todos)
cp -R tmp/build/todos/$tag ./
cp $tag/static/todos/en/$build_number/index.html $tag/index.html
rm Buildfile
git checkout Buildfile
done
rm Buildfile
git checkout Buildfile
git checkout gh-pages
for tag in $(git tag);
do
git add $tag
done;
git commit -m "Host todos on Github"