Reformat Mac deployment script to remove tabs

This commit is contained in:
Daniel Masato 2020-04-23 20:27:33 +01:00
parent 2e2155f492
commit a3271af34b
1 changed files with 29 additions and 29 deletions

View File

@ -11,11 +11,11 @@ deploy_path="${root_path}/deploy"
cleanup()
{
# Clean up previous deployments
rm -rf "${build_path}"
rm -rf "${deploy_path}"
mkdir -p "${build_path}"
mkdir -p "${deploy_path}"
# Clean up previous deployments
rm -rf "${build_path}"
rm -rf "${deploy_path}"
mkdir -p "${build_path}"
mkdir -p "${deploy_path}"
}
@ -23,8 +23,8 @@ build_app()
{
# Build Jamulus
qmake "${project_path}" -o "${build_path}/Makefile" "CONFIG+=release" ${@:2}
local target_name="$(cat "${build_path}/Makefile" | sed -nE 's/^QMAKE_TARGET *= *(.*)$/\1/p')"
local job_count="$(sysctl -n hw.ncpu)"
local target_name="$(cat "${build_path}/Makefile" | sed -nE 's/^QMAKE_TARGET *= *(.*)$/\1/p')"
local job_count="$(sysctl -n hw.ncpu)"
make -f "${build_path}/Makefile" -C "${build_path}" -j "${job_count}"
@ -32,28 +32,28 @@ build_app()
macdeployqt "${build_path}/${target_name}.app" -verbose=2 -always-overwrite
mv "${build_path}/${target_name}.app" "${deploy_path}"
# Cleanup
# Cleanup
make -f "${build_path}/Makefile" -C "${build_path}" distclean
# Return app name for installer image
eval "$1=${target_name}"
# Return app name for installer image
eval "$1=${target_name}"
}
build_installer_image()
{
# Install dmgbuild (for the current user), this is required to build the installer image
python -m ensurepip --user --default-pip
python -m pip install --user dmgbuild
local dmgbuild_bin="$(python -c 'import site; print(site.USER_BASE)')/bin/dmgbuild"
# Install dmgbuild (for the current user), this is required to build the installer image
python -m ensurepip --user --default-pip
python -m pip install --user dmgbuild
local dmgbuild_bin="$(python -c 'import site; print(site.USER_BASE)')/bin/dmgbuild"
# Get Jamulus version
local app_version="$(cat "${project_path}" | sed -nE 's/^VERSION *= *(.*)$/\1/p')"
# Get Jamulus version
local app_version="$(cat "${project_path}" | sed -nE 's/^VERSION *= *(.*)$/\1/p')"
# Build installer image
"${dmgbuild_bin}" -s "${macdeploy_path}/deployment_settings.py" -D background="${resources_path}/installerbackground.png" \
-D app_path="${deploy_path}/$1.app" -D server_path="${deploy_path}/$2.app" \
-D license="${root_path}/COPYING" "$1 Installer" "${deploy_path}/$1-${app_version}-installer-mac.dmg"
# Build installer image
"${dmgbuild_bin}" -s "${macdeploy_path}/deployment_settings.py" -D background="${resources_path}/installerbackground.png" \
-D app_path="${deploy_path}/$1.app" -D server_path="${deploy_path}/$2.app" \
-D license="${root_path}/COPYING" "$1 Installer" "${deploy_path}/$1-${app_version}-installer-mac.dmg"
}