diff options
author | Mark Longair <mhl@pobox.com> | 2013-12-06 12:59:20 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-12-06 16:14:07 +0000 |
commit | 6ada52492dda1cd3d27995d1b9d7a917beef5b1a (patch) | |
tree | fa251189ce478941f773c401ad5698cad27f8e8a /commonlib | |
parent | 14b8185e8051779a1ba500fe31bd2eb08c89edae (diff) |
Make 'rake themes:install' safer for developers
Previously, the themes:install rake task would remove the existing
theme with 'rm -rf' and re-clone the theme into place. This is
unfortunate for a developer who has been making changes to a theme
and then runs the rails-post-deploy script, since it calls the
themes:install task which will wipe out those changes. In
addition, when installing themes it would deliberately remove the
.git directory of the theme, so if you do want to work in that
theme you'd have to reinitialize the theme directory to be a git
repository again.
This commit changes the task so that now:
- If a theme directory is present but it isn't a git
repository, it's moved out of the way.
- If there's no theme directory at the expected location after
that step, the theme repository is cloned into place
- The task ensures that the origin remote points to the theme's
URL, and fetches from that remote.
- If there are any uncommitted changes in the theme repository
or the current commit appears not to have been pushed, the
task exits with a helpful error.
- The preferred branch or tag is checked out in the theme
repository as before.
(The uninstall, install and post_install hooks are run as before.)
This shouldn't make a difference to deployed instances of Alaveteli
but will be helpful for developers who want to work on developing
a theme.
Fixes #1111.
Diffstat (limited to 'commonlib')
m--------- | commonlib | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/commonlib b/commonlib -Subproject 8070e4c27c903d886963d662db40bb91d56f8c5 +Subproject ad27f5409ef3ed1b800aa08c1d70a018443dcfd |