Compare commits

...

6 Commits

Author SHA1 Message Date
sigseg5
a3ff89855f Fix unbound variable err then BUILD_ONLY env var not set 2023-05-19 12:50:36 +04:00
sigseg5
1c4eabd247 Add an environment variable to build only the application, without any deploy steps 2023-05-18 19:21:22 +04:00
sigseg5
2753ca4807 Fix typo 2023-05-18 17:25:04 +04:00
sigseg5
4713151b7b Fix format 2023-05-18 15:34:39 +04:00
sigseg5
06b0f46a49 Suppress cmake --version stdout 2023-05-18 15:33:59 +04:00
sigseg5
cf1aed1ff1 Fix macOS build in case QT is installed via brew 2023-05-18 15:24:22 +04:00

View File

@@ -1,4 +1,11 @@
#!/bin/bash
# If you want to just build the binary, you can pass `BUILD_ONLY=True` environment variable,
# in this case you'll get only the binary, without any deployment steps like packaging installer
# BUILD_ONLY requires:
# qt you can install minimal QT toolchain via brew: `brew install qt`
echo "Build script started ..."
set -o errexit -o nounset
@@ -49,7 +56,21 @@ echo "Using QIF in $QIF_BIN_DIR"
# Checking env
$QT_BIN_DIR/qt-cmake --version
BREW_BIN_DIR=/opt/homebrew/bin
if "$QT_BIN_DIR"/qt-cmake --version >/dev/null 2>&1; then
QT_CMAKE=$QT_BIN_DIR/qt-cmake
echo "qt-cmake found at $QT_BIN_DIR/qt-cmake"
else
if $BREW_BIN_DIR/qt-cmake --version >/dev/null 2>&1; then
QT_CMAKE=$BREW_BIN_DIR/qt-cmake
echo "qt-cmake found at $BREW_BIN_DIR/qt-cmake"
else
echo "qt-cmake not found in $QT_BIN_DIR or $BREW_BIN_DIR directories."
exit 1
fi
fi
$QT_CMAKE --version
cmake --version
clang -v
@@ -57,9 +78,14 @@ clang -v
echo "Building App..."
cd $BUILD_DIR
$QT_BIN_DIR/qt-cmake -S $PROJECT_DIR -B $BUILD_DIR
$QT_CMAKE -S $PROJECT_DIR -B $BUILD_DIR
cmake --build . --config release --target all
if [ "${BUILD_ONLY:-}" = "True" ] || [ "${BUILD_ONLY:-}" = "true" ]; then
echo Succesfull build $APP_NAME, path to binary: $BUNDLE_DIR
exit 0
fi
# Build and run tests here
echo "____________________________________"