Skip to content

Commit

Permalink
laid the base for some git backing
Browse files Browse the repository at this point in the history
Signed-off-by: why the lucky stiff <why@whytheluckystiff.net>
  • Loading branch information
schleyfox authored and why the lucky stiff committed Mar 23, 2009
1 parent 8002567 commit c3dba83
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.swp
17 changes: 17 additions & 0 deletions lib/hobix/weblog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions server_setup.rb
Original file line number Diff line number Diff line change
@@ -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.