Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/0.9.74'
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Sep 7, 2012
2 parents 869bbed + fbc67a3 commit 0b9f57e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Add remote command by ssh (-H)
* Add bulk update
* Alias support [alias]

2012-08-30 klen

Expand Down
2 changes: 1 addition & 1 deletion makesite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
__author__ = "Kirill Klenov <horneds@gmail.com>"
__license__ = "GNU LGPL"

__version__ = version = '0.9.73'
__version__ = version = '0.9.74'
version_info = map(int, __version__.split('.'))
23 changes: 16 additions & 7 deletions makesite/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ def main(args=None):
LOGGER.info('Logfile: %s' % LOGFILE_HANDLER.stream.name)
LOGGER.info('-' * 60)

config = settings.MakesiteParser()
config.read([
settings.BASECONFIG, settings.HOMECONFIG,
op.join(settings.MAKESITE_HOME or '', settings.CFGNAME),
op.join(op.dirname(__file__), settings.CFGNAME),
])
if args.host:
cmd = "makesite %s %s" % (args.action, ' '.join(args.argv))
for host in args.host:
Expand All @@ -319,7 +313,22 @@ def main(args=None):
def console():
" Enter point "
autocomplete()
main()
config = settings.MakesiteParser()
config.read([
settings.BASECONFIG, settings.HOMECONFIG,
op.join(settings.MAKESITE_HOME or '', settings.CFGNAME),
op.join(op.dirname(__file__), settings.CFGNAME),
])
argv = []
alias = dict(config.items('alias'))
names = alias.keys()
for arg in sys.argv:
if arg in names:
argv += alias[arg].split()
continue
argv.append(arg)

main(argv)


if __name__ == '__main__':
Expand Down
5 changes: 4 additions & 1 deletion makesite/makesite.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ port=80
domain=example.com
mode=dev

# This sections use for custom templates Ex. custom_name=<path_to_custom>
# This section uses for custom templates Ex. custom_name=<path_to_custom>
[Templates]

# This section uses for define alias. Ex. prod = update server.master -H web.prod.server
[alias]
1 change: 1 addition & 0 deletions makesite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, *args, **kwargs):
super(MakesiteParser, self).__init__(*args, **kwargs)
self.add_section('Main')
self.add_section('Templates')
self.add_section('alias')

def defaults(self):
return dict(self.items('Main'))
Expand Down

0 comments on commit 0b9f57e

Please sign in to comment.