Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix deb build script to set prerelease flag correctly #10500

Merged
merged 1 commit into from
Aug 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/10500.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug which caused production debian packages to be incorrectly marked as 'prerelease'.
9 changes: 4 additions & 5 deletions docker/build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down