Mercurial > hg > tony
changeset 648:b80deac5ada8
Bring in another package script from SV
author | Chris Cannam |
---|---|
date | Tue, 22 Oct 2019 17:12:44 +0100 |
parents | 639deb9d6bd4 |
children | 812181ef834b |
files | deploy/clean-build-and-package |
diffstat | 1 files changed, 65 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/clean-build-and-package Tue Oct 22 17:12:44 2019 +0100 @@ -0,0 +1,65 @@ +#!/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` + +mkdir -p packages +echo + +if [ -d /Applications ]; then + + qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }') + + echo "Proceed to rebuild, package, and sign version $version using" + echo -n "qmake path \"$qmake\" [Yn] ? " + read yn + case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac + echo "Proceeding" + + app="Tony" + volume="$app"-"$version" + dmg="$volume".dmg + + rm -rf "$app.app" + rm -f "$dmg" + + ./repoint install + + rm -rf .qmake.stash + "$qmake" -r + make clean + make -j3 + deploy/osx/deploy-and-package.sh + + mv "$dmg" packages/ + +else + + echo -n "Proceed to rebuild and package version $version [Yn] ? " + read yn + case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac + echo "Proceeding" + + ./deploy/linux/build-and-test-appimage.sh + + squashedversion=$(echo "$version" | sed 's/_-//g') + + mv deploy/linux/docker/output/Tony-"$current"-x86_64.AppImage \ + packages/Tony-"$squashedversion"-x86_64.AppImage + + ./deploy/linux/build-and-test-deb.sh + + mv deploy/linux/docker/output/tony_"$version"_amd64.deb \ + packages/ +fi + +echo "Done" +