1#!/bin/bash -ex
2#
3# this script is run on travis for the script stage of mac builds
4#
5
6QMAKE=${QMAKE:-qmake}
7LUPDATE=${LUPDATE:-lupdate}
8LRELEASE=${LRELEASE:-lrelease}
9MACDEPLOYQT=${MACDEPLOYQT:-macdeployqt}
10# we assume we are on macOS, so date is not gnu date.
11VERSIONID=${VERSIONID:-$(date -ju -f %Y-%m-%dT%H:%M:%S%z $(git show -s --format="%aI" HEAD | sed 's/:\(..\)$/\1/') +%Y%m%dT%H%MZ)-$(git rev-parse --short=7 HEAD)}
12
13# debug tokens
14"$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"/ci_tokens
15
16# build and test the CLI
17$QMAKE GPSBabel.pro && make -j 2 && make check
18
19# build the GUI
20pushd gui
21$QMAKE app.pro && make -j 2
22make package
23popd
24
25# what is in there?
26hdiutil attach -noverify gui/GPSBabelFE.dmg
27find /Volumes/GPSBabelFE -ls
28hdiutil detach /Volumes/GPSBabelFE
29
30mv gui/GPSBabelFE.dmg gui/GPSBabel-${VERSIONID}.dmg
31
32
33