Skip to content

Commit 4c0a08b

Browse files
committed
[#3530] add add-changelog-entry Makefile rule
1 parent 3bf0079 commit 4c0a08b

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Diff for: Makefile.am

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_SYSREPOCPP_CONFIGURE_FLAG)
7777

7878
dist_doc_DATA = AUTHORS COPYING ChangeLog README CONTRIBUTING.md SECURITY.md platforms.rst code_of_conduct.md
7979

80-
.PHONY: check-valgrind check-valgrind-suppress
80+
.PHONY: add-changelog-entry check-valgrind check-valgrind-suppress
8181

8282
check-valgrind:
8383
if HAVE_VALGRIND
@@ -179,6 +179,9 @@ install-exec-hook:
179179
mkdir -p $(DESTDIR)${localstatedir}/lib/${PACKAGE_NAME}
180180
mkdir -p $(DESTDIR)${runstatedir}/${PACKAGE_NAME}
181181

182+
add-changelog-entry:
183+
./changelog_unreleased/.add-entry.sh
184+
182185
#### include external sources in the distributed tarball:
183186
EXTRA_DIST = ext/coroutine/coroutine.hpp
184187

Diff for: changelog_unreleased/.add-entry.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
set -eu
4+
5+
parent_dir=$(cd "$(dirname "${0}")" && pwd)
6+
cd "${parent_dir}" || exit 1
7+
8+
author=$(git show -s --format='%ae' | cut -d '@' -f 1)
9+
branch=$(git branch --show-current)
10+
file="${branch}"
11+
gitlab_id=$(printf '%s' "${branch}" | cut -d '-' -f 1)
12+
printf '[category]\t\t%s\n' "${author}" > "${file}"
13+
printf '\tdescription\n' >> "${file}"
14+
printf '\t(Gitlab #%s)\n' "${gitlab_id}" >> "${file}"
15+
printf 'Created changelog_unreleased/%s.\n' "${file}"

0 commit comments

Comments
 (0)