To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / deploy / clean-build-and-package

History | View | Annotate | Download (1.53 KB)

1
#!/bin/bash
2

    
3
set -eu
4

    
5
current=$(hg id | awk '{ print $1; }')
6

    
7
case "$current" in
8
    *+) echo "ERROR: Current working copy has been modified - not proceeding";exit 2;;
9
    *);;
10
esac
11

    
12
version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
13

    
14
mkdir -p packages
15
echo
16

    
17
if [ -d /Applications ]; then
18

    
19
    if [ ! -f Makefile ]; then 
20
	echo "You must have run a routine normal build at least once before this, so I can see which Qt settings to use"
21
	exit 1
22
    fi
23

    
24
    qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }')
25

    
26
    echo "Proceed to rebuild, package, and sign version $version using"
27
    echo -n "qmake path \"$qmake\" [Yn] ? "
28
    read yn
29
    case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
30
    echo "Proceeding"
31

    
32
    app="Sonic Lineup"
33
    volume="$app"-"$version"
34
    dmg="$volume".dmg
35

    
36
    rm -rf "$app.app"
37
    rm -rf "$volume"
38
    rm -f "$dmg"
39

    
40
    ./repoint install
41

    
42
    rm -rf .qmake.stash
43
    "$qmake" -r
44
    make clean
45
    make -j3
46
    deploy/osx/deploy-and-package.sh
47

    
48
    mv "$dmg" packages/
49

    
50
else
51

    
52
    echo -n "Proceed to rebuild and package version $version [Yn] ? "
53
    read yn
54
    case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
55
    echo "Proceeding"
56

    
57
    ./deploy/linux/build-and-test-appimage.sh
58

    
59
    squashedversion=$(echo "$version" | sed 's/_-//g')
60

    
61
    mv deploy/linux/docker/output/SonicLineup-"$current"-x86_64.AppImage \
62
	packages/SonicLineup-"$squashedversion"-x86_64.AppImage
63

    
64
    ./deploy/linux/build-and-test-deb.sh
65

    
66
    mv deploy/linux/docker/output/sonic-lineup_"$version"_amd64.deb \
67
	packages/
68
fi
69

    
70
echo
71

    
72
ls -l packages