some updates

This commit is contained in:
John Bintz 2012-03-13 13:31:33 -04:00
parent f0afac6cc5
commit b73400b0ac
3 changed files with 26 additions and 0 deletions

View File

@ -88,6 +88,31 @@ class Attentive::CLI < Thor
File.open(target, 'wb') { |fh| response.last.each { |part| fh.print part } } File.open(target, 'wb') { |fh| response.last.each { |part| fh.print part } }
end end
end end
desc "gh-pages", "Commit the static site to the associated GitHub pages account"
def gh_pages
static
target = "/tmp/attentive-#{Time.now.to_i}"
system %{cp -Rpv _site #{target}}
system %{git checkout gh-pages}
if $?.exitstatus == 1
puts "Creating gh-pages branch..."
system %{git add . && git commit -a -m "pre-gh pages creation"}
system %{git symbolic-ref HEAD refs/heads/gh-pages}
system %{rm .git/index}
system %{git clean -fdx}
system %{git checkout gh-pages}
end
system %{cp -Rpv #{target}/* .}
system %{git add . && git commit -a -m "Update published site"}
system %{git checkout master}
end
end end
Attentive::CLI.start Attentive::CLI.start

1
skel/.gitignore vendored
View File

@ -1,2 +1,3 @@
.sass-cache/ .sass-cache/
.DS_Store

0
views/_footer.haml Normal file
View File