Permalink
Browse files

laid the base for some git backing

Signed-off-by: why the lucky stiff <why@whytheluckystiff.net>
  • Loading branch information...
1 parent 8002567 commit c3dba83dadf3d6962f9b1b99500244b215b4ee3c @schleyfox schleyfox committed with why the lucky stiff Sep 22, 2008
Showing with 21 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +17 −0 lib/hobix/weblog.rb
  3. +3 −0 server_setup.rb
View
@@ -0,0 +1 @@
+*.swp
View
@@ -146,6 +146,9 @@ def references; reference_fields.map { |f| self.send f }.compact; end
# output_path:: Path to output directory.
# lib_path:: Path to extension library directory.
#
+# git:: If true, regenerations will commit to git and push the
+# site to the blahg remote.
+#
# == Regeneration
#
# One of the primary uses of the Weblog class is to coordinate
@@ -307,6 +310,8 @@ class Weblog
_! 'Libraries and Plugins'
_ :requires, :req => true, :edit_as => :omap
+
+ _ :git, :edit_as => :text
attr_accessor :path
attr_reader :hobix_yaml
@@ -642,9 +647,21 @@ def retouch( only_path = nil, how = nil )
p.publish( published )
end
end
+
+ commit_to_git if @git
+
reset_output_map
end
+ # Method to commit to the local git repo and push pure happiness to the
+ # remote server named blahg (which should be of webserving character and
+ # a pleasant demeanor).
+ def commit_to_git
+ puts `git add .`
+ puts `git commit -a -m "New poshts for the syhtt"`
+ puts `git push blahg master`
+ end
+
# Handler for templates with `index' prefix. These templates will
# receive entries loaded by +Hobix::BaseStorage#lastn+. Only one
# index page is requested by this handler.
View
@@ -0,0 +1,3 @@
+#!/usr/bin/ruby
+
+# So actually, what's we gonna be doing is more like this. We hast to has some github tomfoolery to be the backing store and then we have a (prolly PHP) web service that just sits tight waiting for a post-receive message. When github couriers the hell out of that shit, we pull the fuck out of that repo.

0 comments on commit c3dba83

Please sign in to comment.