Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
implemented a new argument vars in deployment template section
Browse files Browse the repository at this point in the history
feature: implemented a new argument `vars` in deployment template
section. The
new `vars` argument can get used for define a release template section.
If
defined, the build process will apply all arguments from this section as
they
would be a a part of the project section. This allows to inherit a large
amount of arguments in a project definition instead of define them in
each project. This is usefull if you have a stage and many production
variants
and the instance uses config data like a database setup and you need to
share them. For such a usecase you can simply define a stage and
production
section and define all shared arguments and use the right `vars` section
in
your product deployment setup. See the memcached sample in index.txt

Note, this new product deployment template `vars` argument could be a
problem
for your existing setup if you use a vars argument with a value similar
then
a section name defined in your section template.
  • Loading branch information
projekt01 committed Oct 23, 2013
1 parent 4433c03 commit 487169b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGES.txt
Expand Up @@ -20,6 +20,13 @@ CHANGES
a section name defined in your section template.


0.3.1 (2013-09-25)
------------------

- Improvement: added `default-package-version` command line option
to avoid interactive questions on new packages


0.3.0 (2012-12-27)
------------------

Expand Down
5 changes: 5 additions & 0 deletions MANIFEST.in
@@ -1,3 +1,8 @@
global-include *.txt
include *.txt
recursive-include src *.txt *.cfg

# added by check_manifest.py
include *.py
include .travis.yml
include buildout.cfg
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -22,8 +22,8 @@ def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()

setup(
name='keas.build',
version='0.4.0',
name='keas.build',,
version='0.4.0dev',
author = "Stephan Richter and the Zope Community",
author_email = "zope-dev@zope.org",
description='A Build System',
Expand Down
8 changes: 7 additions & 1 deletion src/keas/build/base.py
Expand Up @@ -313,6 +313,11 @@ def optionxform(self, optionstr):
dest="forceVersion", default="", metavar="VERSION",
help="Force one common version through all packages and configs.")

parser.add_option(
"--default-package-version", action="store",
dest="defaultPackageVersion", default="", metavar="VERSION",
help="Set a default package version for not yet released ones.")

parser.add_option(
"--force-svnauth", action="store_true",
dest="forceSvnAuth", default=False,
Expand All @@ -326,7 +331,8 @@ def optionxform(self, optionstr):
parser.add_option(
"-i", "--independent-branches", action="store_true",
dest="independent", metavar="INDEPENDENT", default=False,
help="When specified, the system makes sure the last release is based on the given branch.")
help=("When specified, the system makes sure the last release is based "
"on the given branch."))

parser.add_option(
"--no-upload", action="store_true",
Expand Down
7 changes: 6 additions & 1 deletion src/keas/build/package.py
Expand Up @@ -463,7 +463,12 @@ def runCLI(self, configFile, askToCreateRelease=False, forceSvnAuth=False):
else:
logger.info(
"Not checking for changes because --force-version was used")


# If there's no version the package is probably non existent
if defaultVersion is None and self.options.defaultPackageVersion:
# avoid interactive questions (handy for automated builds)
defaultVersion = self.options.defaultPackageVersion

branch = self.options.branch
while True:
version = base.getInput(
Expand Down

0 comments on commit 487169b

Please sign in to comment.