nedbat / scriv

Changelog management tool
https://scriv.readthedocs.io
Apache License 2.0
260 stars 29 forks source link

yaml support for literals #69

Closed fkuep closed 1 year ago

fkuep commented 2 years ago

Hi Ned and everybody,

I want to use scriv to changlog my ansible collection . It's version is in a galaxy.yaml file like this:

namespace: myCollections
name: a_collection
version: 1.2.3
authors:
- Me  <ich@mag.net>
description: This is gonna be great!
repository: https://github.com/example-corp/fluffy_husky.git
issues: https://github.com/example-corp/fluffy_husky/issues
build_ignore: ['*.tar.gz', '*.pass', '*.key', '*.id_rsa', publish.sh,
  .gitignore, 'changelog.d/*']

Now - wouldn't it be great, if literals could be enhanced to parse yaml files ?

fkuep commented 2 years ago

This seems to work:

$ scriv collect --keep
Collecting from changelog.d
$

changelog.d/scriv.ini

[scriv]
format = md
version = literal: galaxy.yml: version

generated CHANGELOG.md

<a id='changelog-1.2.3'></a>
# 1.2.3 — 2022-11-25

## Added

- I did the following new ...
nedbat commented 1 year ago

Implemented in 65f7e96.