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

Add support for YAML config files #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add support for YAML config files #34

wants to merge 1 commit into from

Conversation

abesto
Copy link
Contributor

@abesto abesto commented May 2, 2019

This paves the way for distributing project presets. It also provides a possibly more convenient, less error-prone way to share invocations of the tool.

For example, this invocation:

python src/main.py --module zipkin --version 2.13.0 --gpg-key DA805D02 \
     --git-hash 7c08091d3f8b0428d1d78839d3bef0f6887746f2 --repo dev \
     --zipname-template 'apache-{module}{dash_incubating}-{version}-source-release' \
     --github-reponame-template '{incubator_dash}{module}.git' \
     --build-and-test-command 'echo skipped'

Can be reproduced with a config file zipkin.2.13.0.yaml containing the following:

module: zipkin
version: 2.13.0
gpg-key: DA805D02
git_hash: 7c08091d3f8b0428d1d78839d3bef0f6887746f2
repo: dev
zipname-template: 'apache-{module}{dash_incubating}-{version}-source-release'
github-reponame-template: '{incubator_dash}{module}.git'
build-and-test-command: 'echo skipped'

And the invocation is then:

python3 src/main.py --config ./zipkin-2.13.0.yaml

Note that like any well-behaved CLI tool, explicit arguments override values in the config file. For example this breaks:

python3 src/main.py --config ./zipkin-2.13.0.yaml --project foobar

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant