Skip to content

Commit

Permalink
Add deploy target to Rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Nov 1, 2013
1 parent 451c801 commit a20fcc9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .deploy-excludes
@@ -0,0 +1,16 @@
# A list of excludes for rsync, when deploying the editor
.git
design
README.adoc
log
repos
tmp
Gemfile
Gemfile.lock
deploy-excludes
Guardfile
Rakefile
config.*
specification.adoc
doc

5 changes: 5 additions & 0 deletions README.adoc
Expand Up @@ -36,3 +36,8 @@ The application takes advantage of the latest in CSS3 flexbox so the following b
== Contributing

`compass watch` to watch for SASS changes

== Create a copy of the app for usage

Run `rake assets:deploy` to copy the files necessary for using the server to the deploy directory (by default /opt/web-editor)

7 changes: 7 additions & 0 deletions Rakefile
@@ -1,3 +1,4 @@
$deploy_dir="/opt/web-editor"
task :default => 'test:spec'

namespace :assets do
Expand Down Expand Up @@ -50,6 +51,12 @@ namespace :assets do
asset.write_to(outfile)
puts "successfully compiled js assets"
end

desc 'Deploy web-editor to #{$deploy_dir} for usage by provided init script'
task :deploy do
`rsync -a --exclude-from=\.deploy-excludes ./** #{$deploy_dir}`
end

end

namespace :test do
Expand Down

0 comments on commit a20fcc9

Please sign in to comment.