We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from pathlib import Path from tomli import loads from tomli_w import dumps dirs = [ "databind/.changelog", "databind.core/.changelog", "databind.json/.changelog", ] output = ".changelog" releases = {x.name for d in dirs for x in Path(d).iterdir()} for release in releases: files = [Path(d) / release for d in dirs] payloads = [(f.parent.parent.name, loads(f.read_text())) for f in files if f.is_file()] release_dates = {x[1].get("release-date") for x in payloads} if len(release_dates) != 1: release_date = min(filter(None, release_dates)) print(f"warning: mismatching release-date values in {release}: {release_dates}; using {release_date}") else: release_date = release_dates.pop() entries = [{**e, "component": x[0]} for x in payloads for e in x[1].get("entries", [])] dest = Path(output) / release result = {"entries": entries} if release_date is not None: result["release-date"] = release_date dest.write_text(dumps(result))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: