summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-08-01 10:47:36 +0100
committerGitHub <noreply@github.com>2021-08-01 10:47:36 +0100
commit2afdb5c98470ab9d5aa793906c1710a65fb3028c (patch)
treeeec79ec5724c6258956b9499a72f2c58f127f61d
parentFix explicit assignment of PL 0 from being misinterpreted in rare circumstanc... (diff)
downloadsynapse-2afdb5c98470ab9d5aa793906c1710a65fb3028c.tar.xz
Fix deb build script to set prerelease flag correctly (#10500)
-rw-r--r--changelog.d/10500.misc1
-rw-r--r--docker/build_debian.sh9
2 files changed, 5 insertions, 5 deletions
diff --git a/changelog.d/10500.misc b/changelog.d/10500.misc
new file mode 100644
index 0000000000..dbaff57364
--- /dev/null
+++ b/changelog.d/10500.misc
@@ -0,0 +1 @@
+Fix a bug which caused production debian packages to be incorrectly marked as 'prerelease'.
diff --git a/docker/build_debian.sh b/docker/build_debian.sh
index f572ed9aa0..801ff45471 100644
--- a/docker/build_debian.sh
+++ b/docker/build_debian.sh
@@ -11,10 +11,6 @@ DIST=`cut -d ':' -f2 <<< $distro`
 cp -aT /synapse/source /synapse/build
 cd /synapse/build
 
-# add an entry to the changelog for this distribution
-dch -M -l "+$DIST" "build for $DIST"
-dch -M -r "" --force-distribution --distribution "$DIST"
-
 # if this is a prerelease, set the Section accordingly.
 #
 # When the package is later added to the package repo, reprepro will use the
@@ -23,11 +19,14 @@ dch -M -r "" --force-distribution --distribution "$DIST"
 
 DEB_VERSION=`dpkg-parsechangelog -SVersion`
 case $DEB_VERSION in
-    *rc*|*a*|*b*|*c*)
+    *~rc*|*~a*|*~b*|*~c*)
         sed -ie '/^Section:/c\Section: prerelease' debian/control
         ;;
 esac
 
+# add an entry to the changelog for this distribution
+dch -M -l "+$DIST" "build for $DIST"
+dch -M -r "" --force-distribution --distribution "$DIST"
 
 dpkg-buildpackage -us -uc