changeset 2390:1f392d58ee88

Towards single-script packaging
author Chris Cannam
date Mon, 21 Oct 2019 10:55:15 +0100
parents 0a2cdcbc22e6
children d436e75169e3
files deploy/clean-build-and-package version.h
diffstat 2 files changed, 45 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/clean-build-and-package	Mon Oct 21 10:55:15 2019 +0100
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+set -eu
+
+current=$(hg id | awk '{ print $1; }')
+
+case "$current" in
+    *+) echo "ERROR: Current working copy has been modified - not proceeding"; exit 2;;
+    *);;
+esac
+
+version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
+
+echo -n "Proceed to rebuild and package version $version [Yn] ? "
+read yn
+
+if [ -z "$yn" ]; then
+    yn=y
+elif [ "$yn" = "Y" ]; then
+    yn=y
+fi
+
+if [ "$yn" != "y" ]; then
+    exit 3
+fi
+
+echo "Proceeding"
+
+mkdir -p packages
+
+./deploy/linux/build-and-test-appimage.sh
+
+squashedversion=$(echo "$version" | sed 's/_-//g')
+
+mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \
+   packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage
+
+./deploy/linux/build-and-test-deb.sh
+
+mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \
+   packages/
+
+echo "Done"
+
--- a/version.h	Fri Oct 18 14:20:32 2019 +0100
+++ b/version.h	Mon Oct 21 10:55:15 2019 +0100
@@ -1,1 +1,1 @@
-#define SV_VERSION "4.0-pre3"
+#define SV_VERSION "4.0-pre4"