Commit 09a78f2e authored by Sebastian Damm's avatar Sebastian Damm Committed by Michael Prokop

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.
parent c1e13b9c
......@@ -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}')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment