Created
February 27, 2012 17:08
-
-
Save tim-evans/1925491 to your computer and use it in GitHub Desktop.
SC Todos deploy script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 | |
| 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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment