mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 18:08:16 +00:00
[#3530] Address review
- Add @ to suppress Makefile output. - Warn about file already existing and exit. - Use template file as base.
This commit is contained in:
parent
4c0a08be3b
commit
079e0352ae
@ -180,7 +180,7 @@ install-exec-hook:
|
||||
mkdir -p $(DESTDIR)${runstatedir}/${PACKAGE_NAME}
|
||||
|
||||
add-changelog-entry:
|
||||
./changelog_unreleased/.add-entry.sh
|
||||
@./changelog_unreleased/.add-entry.sh
|
||||
|
||||
#### include external sources in the distributed tarball:
|
||||
EXTRA_DIST = ext/coroutine/coroutine.hpp
|
||||
|
@ -4,12 +4,17 @@ set -eu
|
||||
|
||||
parent_dir=$(cd "$(dirname "${0}")" && pwd)
|
||||
cd "${parent_dir}" || exit 1
|
||||
basedir=$(basename "${parent_dir}")
|
||||
|
||||
author=$(git show -s --format='%ae' | cut -d '@' -f 1)
|
||||
branch=$(git branch --show-current)
|
||||
file="${branch}"
|
||||
gitlab_id=$(printf '%s' "${branch}" | cut -d '-' -f 1)
|
||||
printf '[category]\t\t%s\n' "${author}" > "${file}"
|
||||
printf '\tdescription\n' >> "${file}"
|
||||
printf '\t(Gitlab #%s)\n' "${gitlab_id}" >> "${file}"
|
||||
printf 'Created changelog_unreleased/%s.\n' "${file}"
|
||||
file="${branch}"
|
||||
if test -e "${file}"; then
|
||||
printf 'Nothing done. File already exists: %s\n' "${basedir}/${file}"
|
||||
exit 1
|
||||
fi
|
||||
content=$(cat .template)
|
||||
content="${content//author/${author}}"
|
||||
content="${content//#0000/#${gitlab_id}}"
|
||||
printf '%s\n' "${content}" > "${file}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user