mirror of
https://github.com/drewcassidy/yaclog.git
synced 2024-09-01 14:58:58 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
04a9c712f9 | |||
d35b7fee83 | |||
38560702f4 | |||
2d1cc4ede4 |
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user