Compare commits
2 commits
a0a7c5e0ab
...
6aefda385c
Author | SHA1 | Date | |
---|---|---|---|
|
6aefda385c | ||
|
2198fa2b21 |
3 changed files with 24 additions and 0 deletions
|
@ -44,6 +44,7 @@ pipeline:
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
base_url: https://gitea.zionetrix.net
|
base_url: https://gitea.zionetrix.net
|
||||||
|
note: dist/release_notes.md
|
||||||
files:
|
files:
|
||||||
- gitdch
|
- gitdch
|
||||||
- dist/*.deb
|
- dist/*.deb
|
||||||
|
|
1
build.sh
1
build.sh
|
@ -48,6 +48,7 @@ fi
|
||||||
--version "${VERSION}" \
|
--version "${VERSION}" \
|
||||||
--code-name $DEBIAN_CODENAME \
|
--code-name $DEBIAN_CODENAME \
|
||||||
--output $BDIR/debian/changelog \
|
--output $BDIR/debian/changelog \
|
||||||
|
--release-notes dist/release_notes.md \
|
||||||
"${GITDCH_ARGS[@]}"
|
"${GITDCH_ARGS[@]}"
|
||||||
|
|
||||||
if [ -n "$MAINTAINER_NAME" -a -n "$MAINTAINER_EMAIL" ]
|
if [ -n "$MAINTAINER_NAME" -a -n "$MAINTAINER_EMAIL" ]
|
||||||
|
|
22
gitdch
22
gitdch
|
@ -126,6 +126,15 @@ parser.add_argument(
|
||||||
help='Maintainer email (default: last commit author email)'
|
help='Maintainer email (default: last commit author email)'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
'-R',
|
||||||
|
'--release-notes',
|
||||||
|
type=str,
|
||||||
|
dest='release_notes',
|
||||||
|
help='Specify an optional Markdown release notes output path'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
if not options.package_name:
|
if not options.package_name:
|
||||||
|
@ -258,3 +267,16 @@ if options.output:
|
||||||
fd.writelines(changelog_lines)
|
fd.writelines(changelog_lines)
|
||||||
else:
|
else:
|
||||||
print(''.join(changelog_lines))
|
print(''.join(changelog_lines))
|
||||||
|
|
||||||
|
if options.release_notes:
|
||||||
|
log.info('Generate Markdown release notes')
|
||||||
|
release_notes_lines = ['# Changelog:\n\n']
|
||||||
|
release_notes_lines.extend([
|
||||||
|
f'* {message}\n'
|
||||||
|
for message in versions[0]['messages']
|
||||||
|
])
|
||||||
|
log.info(
|
||||||
|
'Write generated Markdown release notes in file %s',
|
||||||
|
options.release_notes)
|
||||||
|
with open(options.release_notes, 'w', encoding='utf8') as fd:
|
||||||
|
fd.writelines(release_notes_lines)
|
||||||
|
|
Loading…
Reference in a new issue