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
d1faf7656a
14
Rakefile
14
Rakefile
@ -197,20 +197,20 @@ end
|
||||
|
||||
desc "Default deploy task"
|
||||
task :deploy do
|
||||
[:copydot, "#{deploy_default}"].each { |t| Rake::Task[t].execute }
|
||||
Rake::Task[:copydot].invoke(source_dir, public_dir)
|
||||
Rake::Task["#{deploy_default}"].execute
|
||||
end
|
||||
|
||||
desc "Generate website and deploy"
|
||||
task :gen_deploy do
|
||||
[:integrate, :generate, :deploy].each { |t| Rake::Task[t].execute }
|
||||
task :gen_deploy => [:integrate, :generate, :deploy] do
|
||||
end
|
||||
|
||||
desc "copy dot files for deployment"
|
||||
task :copydot do
|
||||
task :copydot, :source, :dest do |t, args|
|
||||
exclusions = [".", "..", ".DS_Store"]
|
||||
Dir["#{source_dir}/**/.*"].each do |file|
|
||||
Dir["#{args.source}/**/.*"].each do |file|
|
||||
if !File.directory?(file) && !exclusions.include?(File.basename(file))
|
||||
cp(file, file.gsub(/#{source_dir}/, "#{public_dir}"));
|
||||
cp(file, file.gsub(/#{args.source}/, "#{args.dest}"));
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -225,7 +225,7 @@ desc "deploy public directory to github pages"
|
||||
multitask :push do
|
||||
puts "## Deploying branch to Github Pages "
|
||||
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
|
||||
system "cp -R #{public_dir}/ #{deploy_dir}"
|
||||
Rake::Task[:copydot].invoke(public_dir, deploy_dir)
|
||||
puts "\n## copying #{public_dir} to #{deploy_dir}"
|
||||
cd "#{deploy_dir}" do
|
||||
system "git add ."
|
||||
|
Loading…
x
Reference in New Issue
Block a user