mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2025-02-28 08:21:52 -05:00
Merge branch 'master' into site
This commit is contained in:
commit
b5df8f9ae9
23
Rakefile
23
Rakefile
@ -60,12 +60,11 @@ task :watch do
|
||||
compassPid = Process.spawn("compass watch")
|
||||
|
||||
trap("INT") {
|
||||
Process.kill(9, jekyllPid)
|
||||
Process.kill(9, compassPid)
|
||||
[jekyllPid, compassPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
|
||||
exit 0
|
||||
}
|
||||
|
||||
Process.wait
|
||||
[jekyllPid, compassPid].each { |pid| Process.wait(pid) }
|
||||
end
|
||||
|
||||
desc "preview the site in a web browser"
|
||||
@ -77,13 +76,11 @@ task :preview do
|
||||
rackupPid = Process.spawn("rackup --port #{server_port}")
|
||||
|
||||
trap("INT") {
|
||||
Process.kill(9, jekyllPid)
|
||||
Process.kill(9, compassPid)
|
||||
Process.kill(9, rackupPid)
|
||||
[jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
|
||||
exit 0
|
||||
}
|
||||
|
||||
Process.wait
|
||||
[jekyllPid, compassPid, rackupPid].each { |pid| Process.wait(pid) }
|
||||
end
|
||||
|
||||
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
|
||||
@ -199,15 +196,21 @@ end
|
||||
##############
|
||||
|
||||
desc "Default deploy task"
|
||||
multitask :deploy => [:copydot, "#{deploy_default}"] do
|
||||
task :deploy do
|
||||
[:copydot, "#{deploy_default}"].each { |t| Rake::Task[t].execute }
|
||||
end
|
||||
|
||||
desc "Generate website and deploy"
|
||||
task :gen_deploy do
|
||||
[:integrate, :generate, :deploy].each { |t| Rake::Task[t].execute }
|
||||
end
|
||||
|
||||
desc "copy dot files for deployment"
|
||||
task :copydot do
|
||||
exclusions = [".", "..", ".DS_Store"]
|
||||
Dir["#{source_dir}/.*"].each do |file|
|
||||
Dir["#{source_dir}/**/.*"].each do |file|
|
||||
if !File.directory?(file) && !exclusions.include?(file)
|
||||
cp(file, "#{public_dir}");
|
||||
cp(file, file.gsub(/#{source_dir}/, "#{public_dir}"));
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user