Browse Source

generate-git-snapshot: support DCH_CHANGELOG_FILE to change path for git-dch

In cases where the source package comes already with a debian
folder which is located in some subfolder, it can be needed to
specify the path to that file explicitly for git-dch to work
correctly. That's what "$DCH_CHANGELOG_FILE" can be used for.

For example in the Kamailio repository at
https://github.com/kamailio/kamailio you see that there is no
debian folder in the project root. The debian folder is located
under pkg/kamailio/deb/$distribution. When symlinking this folder
to ./debian before starting the build, then git-dch inspects
./debian/changelog but it finds no commit for the latest
changelog entry.  So we have to point git-dch to the changelog
file where it is actually committed. By using
"DCH_CHANGELOG_FILE=pkg/kamailio/deb/$distribution/changelog"
this works as intended. Otherwise git-dch will start building a
changelog entry for all commits that exist in the project, but
that will run forever.
tags/0.18.4
Sebastian Damm Michael Prokop 5 years ago
parent
commit
09a78f2e16
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      scripts/generate-git-snapshot

+ 2
- 2
scripts/generate-git-snapshot View File

@@ -209,7 +209,7 @@ git_dch_auto() {
dch -b --distribution=UNRELEASED --newversion=$VERSION_STRING -- \
"SNAPSHOT autobuild for unreleased $ORIG_VERSION via jenkins-debian-glue."
else
${GBP_DCH} --auto $DCH_COMBINED_OPTS
${GBP_DCH} --auto $DCH_COMBINED_OPTS ${DCH_CHANGELOG_FILE:-}
fi
}

@@ -234,7 +234,7 @@ identify_latest_change() {
fi

echo "Latest tag [${last_tag:-}] / merge [${last_merge:-}] seems to be $since"
${GBP_DCH} -s "${since}" $DCH_COMBINED_OPTS
${GBP_DCH} -s "${since}" $DCH_COMBINED_OPTS ${DCH_CHANGELOG_FILE:-}

local NEW_VERSION=$(dpkg-parsechangelog | awk '/^Version: / {print $2}')



Loading…
Cancel
Save