aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-12-25 10:07:58 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-12-25 10:07:58 +0100
commit795ba2d84810a9cca1ca8249d3e131d0db9e208c (patch)
treeb7701d8a06be8271bd2a86c3d71e0e8def0a6db1
parenta88666263efba6712823960e9a32d1b3ab381472 (diff)
downloadqtmips-795ba2d84810a9cca1ca8249d3e131d0db9e208c.tar.gz
qtmips-795ba2d84810a9cca1ca8249d3e131d0db9e208c.tar.bz2
qtmips-795ba2d84810a9cca1ca8249d3e131d0db9e208c.zip
prepare-release: document alternative Debian package preparation in quilt mode.
Attempt to prepare alternative approach to create Debian package with use of GBP tool which allows to create package in quilt source package format instead of native. DEBIAN_NATIVE is still used as default. I have not managed how to use efficiently git branches and Debian tools to create quilt package. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-rwxr-xr-xprepare-release26
1 files changed, 25 insertions, 1 deletions
diff --git a/prepare-release b/prepare-release
index 9ad59cb..e8805b4 100755
--- a/prepare-release
+++ b/prepare-release
@@ -16,6 +16,8 @@ V_DATE_RFC="$( date -R )"
V_USER_NAME="$(git config user.name)"
V_USER_EMAIL="$(git config user.email)"
+DEBIAN_NATIVE=1
+
sed --in-place \
-e 's#^\([\t ]*\)versionText = "Version [^"]*\\n";.*$#\1versionText = "Version '"$V_TXT"'\\n";#' \
qtmips_gui/aboutdialog.cpp
@@ -24,6 +26,12 @@ sed --in-place \
-e 's#^\([\t ]*\)app.setApplicationVersion("[^"]*");.*$#\1app.setApplicationVersion("'"$V_TXT"'");#' \
qtmips_gui/main.cpp
+sed --in-place \
+ -e 's#^\([\t ]*\)app.setApplicationVersion("[^"]*");.*$#\1app.setApplicationVersion("'"$V_TXT"'");#' \
+ qtmips_cli/main.cpp
+
+if [ $DEBIAN_NATIVE -eq 1 ] ; then
+
if grep -q "qtmips ($V_TXT)" debian/changelog ; then
sed --in-place \
-e '1,/^ -- .*$/s/^ -- .*$/'" -- $V_USER_NAME <$V_USER_EMAIL> $V_DATE_RFC/" \
@@ -41,11 +49,15 @@ cat debian/changelog >>debian/changelog.tmp
mv debian/changelog.tmp debian/changelog
fi
+nedit-nc debian/changelog
+
+fi # DEBIAN_NATIVE
+
sed --in-place \
-e 's#^\(Version:[\t ]*\)[^ ]\+ *$#\1'"$V_TXT"'#' \
qtmips.spec
-nedit-nc debian/changelog
+if [ $DEBIAN_NATIVE -eq 1 ] ; then
echo Press enter to continue
read x
@@ -53,6 +65,8 @@ read x
git add debian/changelog qtmips_gui/aboutdialog.cpp \
qtmips_gui/main.cpp qtmips.spec
+fi # DEBIAN_NATIVE
+
echo >.git/GITGUI_MSG "Version updated to $V_TXT"
git gui
@@ -61,6 +75,16 @@ git tag -d v$V_TXT
git tag -s v$V_TXT
+if [ $DEBIAN_NATIVE -eq 0 ] ; then
+
+gbp import-ref --upstream-version=$V_TXT --upstream-tag=v$V_TXT --debian-branch=debian/master
+
+git checkout debian/master -- .
+
+gbp dch --debian-branch=debian/master --release
+
+fi # !DEBIAN_NATIVE
+
rm -rf ../debian-test-build
mkdir -p ../debian-test-build/qtmips-$V_TXT