Limit entries created in changelog.

This commit is contained in:
Benjamin Bohard 2022-03-31 15:43:21 +02:00
parent 766151eae3
commit b49c8c8b02
1 changed files with 9 additions and 0 deletions

View File

@ -181,6 +181,7 @@ function packager_from_commit {
}
function next_version {
set -x
commit="$1"
# upstream version is given by most recent of release or pkg tag
previous_pkg="$(git describe --long --match='pkg/*' $commit 2>/dev/null)"
@ -204,6 +205,7 @@ function next_version {
version="$(get_upstream_version_from_tag $previous_release)-1"
elif [ -n "$previous_pkg" ]
then
distance_from_pkg=$(get_distance_from_tag "$previous_pkg" "$commit")
distance=$distance_from_pkg
version="$(get_upstream_version_from_tag $previous_pkg)-$(expr $(get_package_version_from_tag $previous_pkg) + 1)"
else
@ -215,6 +217,7 @@ function next_version {
version="${version}~${package_level}+${distance}"
fi
echo $version
set +x
}
function gen_changelog_entry {
@ -257,9 +260,15 @@ function gen_changelog_entry {
}
function gen_changelog() {
limit=10
while gen_changelog_entry $ceiling_commit
do
limit=`expr $limit - 1`
echo $changelog_entry
if [ "$limit" -le 0 ]
then
break
fi
done
}