PageRenderTime 120ms CodeModel.GetById 65ms app.highlight 11ms RepoModel.GetById 39ms app.codeStats 0ms

/admin/mac/build-release-osx.sh

http://github.com/tomahawk-player/tomahawk
Shell | 59 lines | 36 code | 15 blank | 8 comment | 2 complexity | 8296b887da9eb5e1680e34d1fe234882 MD5 | raw file
 1#!/bin/bash
 2#
 3# Usage: ./admin/mac/build-release-osx.sh VERSION CERT_SIGNER [--no-clean]
 4#
 5################################################################################
 6
 7TARGET_NAME="Tomahawk"
 8
 9set -e
10
11function header {
12    echo -e "\033[0;34m==>\033[0;0;1m $1 \033[0;0m"
13}
14
15function die {
16    exit_code=$?
17    echo $1
18    exit $exit_code
19}
20################################################################################
21
22if [ -z "$2" ]
23then
24    echo This script expects the version number and cert-signer as parameters, e.g. "1.0.0 John Doe"
25    exit 1
26fi
27
28ROOT=`pwd`
29VERSION=$1
30CERT_SIGNER=$2
31
32################################################################################
33
34    header "Fixing and copying libraries"
35    $ROOT/../admin/mac/macdeploy.py "${TARGET_NAME}.app" quiet
36
37    cd "${TARGET_NAME}.app"
38
39    cp $ROOT/../admin/mac/qt.conf Contents/Resources/qt.conf
40
41    header "Fixing fonts"
42    mkdir "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
43    cp -R $ROOT/../data/fonts/*.ttf "${ROOT}/${TARGET_NAME}.app/Contents/Resources/Fonts"
44
45    header "Signing bundle"
46    cd ..
47    if [ -f ~/sign_step.sh ];
48    then
49        ~/sign_step.sh "$CERT_SIGNER" "${TARGET_NAME}.app"
50    fi
51
52    header "Creating DMG"
53    $ROOT/../admin/mac/create-dmg.sh "${TARGET_NAME}.app"
54    mv "${TARGET_NAME}.dmg" "${TARGET_NAME}-$VERSION.dmg"
55
56    header "Creating signed Sparkle update"
57#     $ROOT/../admin/mac/sign_bundle.rb "${TARGET_NAME}" $VERSION ~/tomahawk_sparkle_privkey.pem
58
59    header "Done!"