forked from reidab/osbp_wordpress
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
29 lines (25 loc) · 893 Bytes
/
Rakefile
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
# Settings
user = 'swenson'
host = 'opensourcebridge.org'
path = '/var/www/wordpress/wp-content/themes/osbp_wordpress_theme_v3/'
# Derived settings
remote = "#{user}@#{host}:#{path}"
# rsync: (v)erbose e(x)clude-other-devices (r)ecursive preserve-sym(l)inks
rsync = 'rsync -e "ssh" --rsync-path="sudo -u wordpress rsync" --checksum -vxrl --progress --exclude=.* --exclude=*~ --exclude=*.swp --exclude=Rakefile --exclude=my_common_styles_url.txt* --exclude=shared_fragments'
desc "Show help"
task :help do
puts <<-HERE
Tasks:
* deploy => Deploys files to production server
* fetch => Copies files from production server
HERE
end
task :default => :help
desc "Deploys common style files using rsync"
task :deploy do
sh "#{rsync} . #{remote}"
end
desc "Copy deployed files from remote into this directory -- will overwrite your files here"
task :fetch do
sh "#{rsync} #{remote} ."
end