summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-23 13:06:03 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-23 13:15:08 +0100
commitb1e593e62882c63b68f961527c0577bd4d53b2d7 (patch)
treed274f8f884d3a9877570c53042a859db39b7d52a
parentf32d0441063b67cb846d08760a6a797e2a1ea07a (diff)
gbp-try-ff: improve mails
Print source package too and only use the mail address since the maintainer name might contain UTF-8. Gbp-Dch: Ignore
-rwxr-xr-xexamples/gbp-try-ff18
1 files changed, 11 insertions, 7 deletions
diff --git a/examples/gbp-try-ff b/examples/gbp-try-ff
index 627ba643..725ea3e3 100755
--- a/examples/gbp-try-ff
+++ b/examples/gbp-try-ff
@@ -5,6 +5,9 @@
set -e
DB=$(gbp config buildpackage.debian-branch | sed 's/\(.*debian-branch=\)\(.*\)/\2/')
+MAINTAINER=$(dpkg-parsechangelog -SMaintainer)
+SOURCE=$(dpkg-parsechangelog -SSource)
+OLD_VERSION=$(dpkg-parsechangelog -SVersion)
git checkout "${DB}"
gbp pq import --force
@@ -30,16 +33,17 @@ fi
gbp pq export --commit
gbp dch -S -a
+
+NEW_VERSION=$(dpkg-parsechangelog -SVersion)
+git commit -m"Snapshot build of ${SOURCE} $NEW_VERSION" debian/changelog
+
gbp buildpackage --git-pbuilder \
- --git-ignore-new \
--git-no-pristine-tar \
--git-postbuild='lintian $GBP_CHANGES_FILE' \
-nc \
${GBP_BUILDPACKAGE_ARGS}
-NEW_VERSION=$(dpkg-parsechangelog -SVersion)
-MAINTAINER=$(dpkg-parsechangelog -SMaintainer)
-echo "New version ${NEW_VERSION} importet and built"
-
-mail -s "Imported new version ${NEW_VERSION}" "${MAINTAINER}" < /dev/null
-
+MSG="Fast forward of ${SOURCE} from ${OLD_VERSION} to ${NEW_VERSION} successful"
+echo "${MSG}"
+MAILADDR=$(echo $MAINTAINER | sed -e 's/.*<\(.*\)>/\1/')
+echo "$MSG" | mail -s "Update of ${SOURCE} to ${NEW_VERSION}" "${MAILADDR}"