#!/usr/bin/ruby -wrubygems # == Synopsis # # SiteFuel is a program and lightweight Ruby API for processing the # source code behind your static and dynamic websites. SiteFuel can # remove comments and unneeded whitespace from your CSS, HTML, and # JavaScript files (as well as fragments in RHTML and PHP) files. It can # also loss-lessly compress your PNG and JPEG images. SiteFuel can also # deploy your website from SVN or GIT. # # Support for more file formats and repositories is planned for future # versions. # # # == Usage # # sitefuel [--scm=file|svn|git] [] [--debug] \ # [--verbose] # [--help] # [--license] # # === # Possible commands are: # pull: Pulls a website from an SCM into a temporary directory. # stage:: Simulate a deployment of a site. # deploy:: Deploy a site using SiteFuel. # process:: Deploy a website in-place. Not recommended. # help:: Show this message. # # === # SiteFuel can typically guess what driver to use, but you can explicitly # specify: # # filesystem:: deploy a directory # svn:: use with Subversion repositories # git:: use with Git repositories # # === # Specify the source SiteFuel is deploying from. This should accept all # protocols supported by enabled drivers. Eg. # # For svn: # svn+ssh://user@sitefuel.org/svn/web/sitefuel-main # # For git: # ssh://user@sitefuel.org/... # # === # Specify the directory into which SiteFuel is to deploy. Currently SiteFuel can # only deploy into the file system. # # === --debug # Enables all messages including debugging. This will give you a blow by blow # account of what SiteFuel is doing. # # === --verbose # Enables most messages. This will give you a relatively detailed account of # how SiteFuel is deploying your site. # # # == Examples # Process an already deployed site: # sitefuel deploy /var/www/sitefuel /var/www/sitefuel-compacted # # Deploy a site from SVN: # sitefuel deploy svn+ssh://sitefuel.org/svn/tags/21 /var/www/ # # == Links # # * More information: http://sitefuel.org # * Getting started: http://sitefuel.org/getstarted # * Documentation: http://sitefuel.org/documentation # # == Author # wkm, Zanoccio LLC. # # == Copyright # Copyright (c) 2009 Zanoccio. # # == License # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # stage:: # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # add source/ to the load path $:.unshift File.join(File.dirname(__FILE__), "..", "lib") begin begin require 'rubygems' rescue LoadError # attempt to continue running the program end require 'sitefuel/SiteFuelRuntime' require 'sitefuel/CommandLine' def main runtime = SiteFuel::SiteFuelRuntime.new SiteFuel::CommandLine::parse_command_line(runtime) end main() rescue Interrupt puts 'Fatal: interrupted. Exiting.' end