Fixes changelog creation starting on a pkg tag

This commit is contained in:
Benjamin Bohard 2020-09-16 09:39:35 +02:00
parent fdba555beb
commit 97fd00a3c7
1 changed files with 2 additions and 5 deletions

View File

@ -12,7 +12,7 @@ pkg_tags="$(git for-each-ref --format '%(refname)' refs/tags | tac)"
# Set starting commit
ceiling_commit=$(git describe --match "build/*" --abbrev=0 2>/dev/null)
if [ -z "ceiling_commit" ]
if [ -z "$ceiling_commit" ]
then
ceiling_commit="HEAD"
fi
@ -220,14 +220,13 @@ function next_version {
function gen_changelog_entry {
ceiling_commit=$1
floor_commit="$(next_step "${ceiling_commit}")"
if [ "$(get_hash ${ceiling_commit})" = "$(get_hash ${floor_commit})" ]
then
return 1
fi
if on_pkg_tag $ceiling_commit
then
ceiling_commit="$(get_previous_pkg_tag $ceiling_commit)"
version="$(get_upstream_version_from_tag $ceiling_commit)-$(get_package_version_from_tag $ceiling_commit)"
distribution="$(get_distribution_from_tag $ceiling_commit)"
else
@ -235,13 +234,11 @@ function gen_changelog_entry {
version=$(next_version $ceiling_commit)
distribution="UNRELEASED"
fi
#current_release="$(git describe --abbrev=0 --always --match='release/*' $ceiling_commit)"
tamarin_info "Création de lentrée de changelog entre ${ceiling_commit} et ${floor_commit}"
maintainer="$(packager_from_commit ${ceiling_commit})"
package_date="$(date_from_commit ${ceiling_commit})"
version=${version/_/-}
changelog_entry="${project_name} (${version}) ${distribution}; urgency=${urgency}"
echo "$changelog_entry" >> debian/changelog