# HG changeset patch # User Andre Heinecke # Date 1271152399 0 # Node ID 28df50b267f6f977268f4bd0cd1b34841d83f1b5 # Parent 7810748856331fd4c333cc87b8e8d2ac3a87c07e Expanded the pkg_revision_template dictionary to include rules revision diff -r 781074885633 -r 28df50b267f6 bin/publishstaticweb.py --- a/bin/publishstaticweb.py Tue Apr 13 09:48:19 2010 +0000 +++ b/bin/publishstaticweb.py Tue Apr 13 09:53:19 2010 +0000 @@ -44,11 +44,16 @@ parser = OptionParser() parser.set_defaults(config_file=os.path.join(treepkgcmd.topdir, "staticweb.cfg")) + parser.set_defaults(update_cache_only=False) parser.add_option("--config-file", help=("The configuration file. Default is staticweb.cfg")) + parser.add_option("--update-cache-only", action="store_true", + help=("Stop after updating the cache." + " This omits the last step of the publishing" + " process")) return parser.parse_args() -def publish_static_site(config_filename): +def publish_static_site(config_filename, update_cache_only=False): config = read_config(config_filename) # create web-page on build host @@ -62,14 +67,15 @@ " $cachedir", **config)) - # rsync the web pages from the local cache to the publishing host - call(cmdexpand("rsync -rL --delete $cachedir/" - " $publish_user$@$publish_host:$publish_dir", - **config)) + if not update_cache_only: + # rsync the web pages from the local cache to the publishing host + call(cmdexpand("rsync -rL --delete $cachedir/" + " $publish_user$@$publish_host:$publish_dir", + **config)) def main(): options, args = parse_commandline() - publish_static_site(options.config_file) + publish_static_site(options.config_file, options.update_cache_only) main() diff -r 781074885633 -r 28df50b267f6 treepkg/packager.py --- a/treepkg/packager.py Tue Apr 13 09:48:19 2010 +0000 +++ b/treepkg/packager.py Tue Apr 13 09:53:19 2010 +0000 @@ -251,7 +251,8 @@ if pkg_revision is None: pkg_revision = (self.track.pkg_revision_template - % dict(pkg_revision=1)) + % dict(pkg_revision=1, + rules_revision=rules_revision)) self.pkg_revision = pkg_revision self.base_dir = self.track.pkg_dir_for_revision(self.revision,