5 if [[ -n "$(git status -s)" ]]; then
6 echo >&2 "Git tree is not clean."
10 ts=$(date -u +'%Y%m%dT%H%M%S')
11 dv=$(dpkg-parsechangelog | grep-dctrl -n -s Version '')
13 if ! [[ $dv =~ ^[0-9]+$ ]]; then
14 echo >&2 "Package version is already non-simple ($dv)."
17 trap "git checkout debian/changelog" EXIT
19 dch --newversion "$dv~$ts.1" --force-bad-version --distribution unstable "Snapshot build by ${USER}"