1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-21 12:41:44 +03:00
vimr/bin/build_vimr.sh

39 lines
941 B
Bash
Raw Normal View History

2016-10-14 13:15:32 +03:00
#!/bin/bash
2019-12-22 23:45:42 +03:00
set -Eeuo pipefail
2016-10-17 23:35:29 +03:00
2019-12-22 23:45:42 +03:00
readonly code_sign=${code_sign:?"true or false"}
readonly use_carthage_cache=${use_carthage_cache:?"true or false"}
2016-10-14 13:15:32 +03:00
2020-11-15 00:19:32 +03:00
main () {
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
echo "### Building VimR target"
2020-02-01 19:50:41 +03:00
2020-11-15 00:19:32 +03:00
local -r build_path="./build"
2016-10-14 13:15:32 +03:00
2020-11-15 00:19:32 +03:00
# Carthage often crashes => do it at the beginning.
echo "### Updating carthage"
if [[ "${use_carthage_cache}" == true ]]; then
carthage update --cache-builds --platform macos
else
carthage update --platform macos
fi
2016-10-17 23:35:29 +03:00
2020-11-15 00:19:32 +03:00
./bin/download_nvimserver.sh
2019-04-28 10:34:21 +03:00
2020-11-15 00:19:32 +03:00
echo "### Xcodebuilding"
rm -rf ${build_path}
2020-02-07 01:22:44 +03:00
2020-11-15 18:53:44 +03:00
xcodebuild -configuration Release -derivedDataPath ${build_path} \
-workspace VimR.xcworkspace -scheme VimR \
clean build
2020-02-07 01:22:44 +03:00
2020-11-15 18:53:44 +03:00
if [[ "${code_sign}" == true ]]; then
2020-11-15 00:19:32 +03:00
local -r -x vimr_app_path="${build_path}/Build/Products/Release/VimR.app"
./bin/sign_vimr.sh
fi
2020-11-14 19:18:31 +03:00
2020-11-15 00:19:32 +03:00
echo "### Built VimR target"
popd >/dev/null
}
2016-10-14 13:15:32 +03:00
2020-11-15 00:19:32 +03:00
main