generate-git-snapshot: Support PRE_DCH_HOOK variable for custom scripts

This allows stuff like:

  echo "sed -i 's/^Section: _SECTION_/Section: dev/' debian/control" > /tmp/changeVersion.sh
  export PRE_DCH_HOOK="/tmp/changeVersion.sh"
  /usr/bin/generate-git-snapshot

Thanks: Rudolph Bott <bott@sipgate.de> for the patch
remotes/origin/mika/custom_tests
Michael Prokop 12 years ago
parent a9ab5cc8d6
commit dbdea39252

@ -327,6 +327,11 @@ fi
# check out the according branch/tag with help of $random_branch
branch_checkout
if [ -n "${PRE_DCH_HOOK:-}" ] ; then
echo "*** Found environment variable PRE_DCH_HOOK, set to ${PRE_DCH_HOOK:-} ***"
sh ${PRE_DCH_HOOK:-}
fi
# retrieve version information *after* checking out the according branch/tag,
# otherwise version number might result in something different than expected
version_information

Loading…
Cancel
Save