mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-25 00:48:53 -05:00
fixed variables for github in rakefile
This commit is contained in:
parent
b4540bb461
commit
24246ea808
5
Rakefile
5
Rakefile
@ -103,13 +103,14 @@ multitask :deploy_github => [:default, :clean_debug] do
|
|||||||
require 'git'
|
require 'git'
|
||||||
repo = Git.open('.')
|
repo = Git.open('.')
|
||||||
repo.branch("#{deploy_branch}").checkout
|
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, ".")}
|
Dir["#{site}/*"].each {|f| mv(f, ".")}
|
||||||
rm_rf("#{site}/*")
|
rm_rf(site)
|
||||||
Dir["**/*"].each {|f| repo.add(f) }
|
Dir["**/*"].each {|f| repo.add(f) }
|
||||||
repo.status.deleted.each {|f, s| repo.remove(f)}
|
repo.status.deleted.each {|f, s| repo.remove(f)}
|
||||||
message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}"
|
message = ENV["MESSAGE"] || "Site updated at #{Time.now.utc}"
|
||||||
repo.commit(message)
|
repo.commit(message)
|
||||||
|
repo.push("#{deploy_branch} origin")
|
||||||
repo.branch("#{source_branch}").checkout
|
repo.branch("#{source_branch}").checkout
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user