From 24246ea8088eb612818c67ca47ddc20484d0bb93 Mon Sep 17 00:00:00 2001 From: B Mathis Date: Tue, 24 Nov 2009 17:15:37 -0600 Subject: fixed variables for github in rakefile --- Rakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 763d58b1..b81e4ed0 100644 --- a/Rakefile +++ b/Rakefile @@ -103,13 +103,14 @@ multitask :deploy_github => [:default, :clean_debug] do require 'git' repo = Git.open('.') repo.branch("#{deploy_branch}").checkout - (Dir["*"] - ["#{site}/*"]).each { |f| rm_rf(f) } + (Dir["*"] - [site]).each { |f| rm_rf(f) } Dir["#{site}/*"].each {|f| mv(f, ".")} - rm_rf("#{site}/*") + rm_rf(site) Dir["**/*"].each {|f| repo.add(f) } repo.status.deleted.each {|f, s| repo.remove(f)} message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}" repo.commit(message) + repo.push("#{deploy_branch} origin") repo.branch("#{source_branch}").checkout end -- cgit v1.2.1