4 Commits
1.0.0 ... 1.0.1

Author SHA1 Message Date
04a9c712f9 update changelog 2021-05-09 19:42:01 -07:00
d35b7fee83 Fixed broken header in new changelogs 2021-05-09 19:39:48 -07:00
38560702f4 Path metavar 2021-05-08 00:00:41 -07:00
2d1cc4ede4 Metavar capitalization 2021-05-07 23:59:44 -07:00
4 changed files with 18 additions and 4 deletions

View File

@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file
## 1.0.1 - 2021-05-10
### Fixed
- Fixed broken header in new changelogs
- Improved consistency in command documentation metavars
## 1.0.0 - 2021-05-07
### Changed

View File

@ -28,6 +28,12 @@ class TestCreation(unittest.TestCase):
self.assertTrue(os.path.exists(os.path.abspath(location)), 'yaclog init did not create a file')
self.assertIn(location, result.output, "yaclog init did not echo the file's correct location")
with open(location, 'r') as fp:
self.assertEqual('# Changelog\n', fp.readline())
self.assertEqual('\n', fp.readline())
self.assertEqual('All notable changes to this project will be documented in this file',
fp.readline().rstrip())
with open(location, 'w') as fp:
fp.write(err_str)

View File

@ -223,7 +223,7 @@ class Changelog:
"""
def __init__(self, path=None,
preamble: str = "Changelog\n\nAll notable changes to this project will be documented in this file"):
preamble: str = "# Changelog\n\nAll notable changes to this project will be documented in this file"):
"""
Contents will be automatically read from disk if the file exists

View File

@ -25,7 +25,7 @@ from yaclog.changelog import Changelog
@click.group()
@click.option('--path', envvar='YACLOG_PATH', default='CHANGELOG.md', show_default=True,
@click.option('--path', envvar='YACLOG_PATH', metavar='FILE', default='CHANGELOG.md', show_default=True,
type=click.Path(dir_okay=False, writable=True, readable=True),
help='Location of the changelog file.')
@click.version_option()
@ -131,8 +131,8 @@ def tag(obj: Changelog, add, tag_name: str, version_name: str):
@cli.command(short_help='Add entries to the changelog.')
@click.option('--bullet', '-b', 'bullets', metavar='text', multiple=True, type=str, help='Add a bullet point.')
@click.option('--paragraph', '-p', 'paragraphs', metavar='text', multiple=True, type=str, help='Add a paragraph')
@click.option('--bullet', '-b', 'bullets', metavar='TEXT', multiple=True, type=str, help='Add a bullet point.')
@click.option('--paragraph', '-p', 'paragraphs', metavar='TEXT', multiple=True, type=str, help='Add a paragraph')
@click.argument('section_name', metavar='SECTION', type=str, default='', required=False)
@click.argument('version_name', metavar='VERSION', type=str, default=None, required=False)
@click.pass_obj