Wraps git commit message in double quotes, fixes #139

This commit is contained in:
Frederic Hemberger 2011-09-18 14:07:43 +02:00
parent 347e855ddc
commit 31adeee1df

View File

@ -232,7 +232,7 @@ multitask :push do
system "git add -u" system "git add -u"
puts "\n## Commiting: Site updated at #{Time.now.utc}" puts "\n## Commiting: Site updated at #{Time.now.utc}"
message = "Site updated at #{Time.now.utc}" message = "Site updated at #{Time.now.utc}"
system "git commit -m '#{message}'" system "git commit -m \"#{message}\""
puts "\n## Pushing generated #{deploy_dir} website" puts "\n## Pushing generated #{deploy_dir} website"
system "git push origin #{deploy_branch}" system "git push origin #{deploy_branch}"
puts "\n## Github Pages deploy complete" puts "\n## Github Pages deploy complete"
@ -284,7 +284,7 @@ task :config_deploy, :branch do |t, args|
system "git clean -fdx" system "git clean -fdx"
system "echo 'My Octopress Page is coming soon …' > index.html" system "echo 'My Octopress Page is coming soon …' > index.html"
system "git add ." system "git add ."
system "git commit -m 'Octopress init'" system "git commit -m \"Octopress init\""
rakefile = IO.read(__FILE__) rakefile = IO.read(__FILE__)
rakefile.sub!(/deploy_branch(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_branch\\1=\\2\\3#{args.branch}\\3") rakefile.sub!(/deploy_branch(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_branch\\1=\\2\\3#{args.branch}\\3")
rakefile.sub!(/deploy_default(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_default\\1=\\2\\3push\\3") rakefile.sub!(/deploy_default(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_default\\1=\\2\\3push\\3")