INNER CODE UNIT · Python
main
lissy93/portainer-templates · lib/changelog.py:151
def main():
banner('Changelog', 'Diff templates.json between version tags')
tags = semver_tags()
if not tags:
log.error('No version tags found (needs full git history, not a shallow clone)')
sys.exit(1)
dates = tag_dates()
entries = []
previous_tag, previous_map = None, None
for tag in tags:
current = templates_at(tag)
if current is None:
log.warning(f'{tag}: no templates.json at this tag, skipping')
continue
first = previous_map is None
added, removed, renamed, updated = \
([], [], [], []) if first else diff(previous_map, current)