Simplify argument parsing (#459)
With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
This commit is contained in:
25
src/git.py
25
src/git.py
@@ -1,17 +1,18 @@
|
||||
from common import dates, releasedata
|
||||
from common import dates
|
||||
from common.git import Git
|
||||
from common.releasedata import ProductData, config_from_argv
|
||||
|
||||
"""Fetches versions from tags in a git repository. This replace the old update.rb script."""
|
||||
|
||||
for config in releasedata.list_configs_from_argv():
|
||||
with releasedata.ProductData(config.product) as product_data:
|
||||
git = Git(config.url)
|
||||
git.setup(bare=True)
|
||||
config = config_from_argv()
|
||||
with ProductData(config.product) as product_data:
|
||||
git = Git(config.url)
|
||||
git.setup(bare=True)
|
||||
|
||||
tags = git.list_tags()
|
||||
for tag, date_str in tags:
|
||||
version_match = config.first_match(tag)
|
||||
if version_match:
|
||||
version = config.render(version_match)
|
||||
date = dates.parse_date(date_str)
|
||||
product_data.declare_version(version, date)
|
||||
tags = git.list_tags()
|
||||
for tag, date_str in tags:
|
||||
version_match = config.first_match(tag)
|
||||
if version_match:
|
||||
version = config.render(version_match)
|
||||
date = dates.parse_date(date_str)
|
||||
product_data.declare_version(version, date)
|
||||
|
||||
Reference in New Issue
Block a user