diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-08 12:59:40 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-08 12:59:40 +0200 |
commit | 3a8d5d390d268a770cfec21358b98f8c2232d98b (patch) | |
tree | 8d1203ac6dead931d05f52f1fcec8a98c94b7a5e | |
parent | 6d57556c97d25a6df7e688dd82564f59a0decd85 (diff) |
osmo-release.sh: Check patches under debian/patches apply
Change-Id: I614080361f3cc5bfb89994a8e8e36981529cd439
-rwxr-xr-x | osmo-release.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/osmo-release.sh b/osmo-release.sh index 38f238df..a779a26b 100755 --- a/osmo-release.sh +++ b/osmo-release.sh @@ -61,6 +61,22 @@ check_configureac_debctrl_deps_match() { echo "OK: dependency specific versions in configure.ac and debian/control match" } +# Make sure that patches under debian/patches/ apply: +check_debian_patch_apply() { + if [ ! -d "${GIT_TOPDIR}/debian/patches" ]; then + return + fi + for patch in ${GIT_TOPDIR}/debian/patches/*.patch; do + git apply --check $patch + if [ $? -ne 0 ]; then + echo "ERROR: patch no longer applies! $patch" + exit 1 + else + echo "OK: patch applies: $patch" + fi + done +} + BUMPVER=`command -v bumpversion` GIT_TOPDIR="$(git rev-parse --show-toplevel)" NEW_VER=`bumpversion --list --current-version $VERSION $REL --allow-dirty | awk -F '=' '{ print $2 }'` @@ -81,6 +97,7 @@ fi echo "Releasing $VERSION -> $NEW_VER..." check_configureac_debctrl_deps_match +check_debian_patch_apply if [ "z$LIBVERS" != "z" ]; then if [ "z$MAKEMOD" = "z" ] && [ "z$ALLOW_NO_LIBVERSION_CHANGE" = "z0" ]; then |