1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-23 19:21:53 +03:00

Adapt build scripts

This commit is contained in:
Tae Won Ha 2022-06-26 19:47:23 +02:00
parent 8fe75a7a95
commit dd9736d8bc
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
3 changed files with 5 additions and 45 deletions

View File

@ -20,7 +20,7 @@ jobs:
- name: Build VimR
run: |
is_snapshot=true ./bin/set_new_versions.sh
code_sign=false clean=true use_carthage_cache=false ./bin/build_nightly.sh
notarize=false clean=true use_carthage_cache=false ./bin/build_nightly.sh
- name: Replace artifact
env:
GH_REPO: ${{ github.repository }}

@ -1 +1 @@
Subproject commit dea97cda276471615f34e60f7c07899ed44b0062
Subproject commit a3b0337be15983de059f70be02e9630e2d0bf25c

View File

@ -1,57 +1,17 @@
#!/bin/bash
set -Eeuo pipefail
readonly code_sign=${code_sign:?"true or false"}
readonly notarize=${notarize:?"true or false"}
readonly use_carthage_cache=${use_carthage_cache:?"true or false"}
readonly clean=${clean:?"true or false"}
prepare_nvimserver() {
resources_folder="./NvimView/Sources/NvimView/Resources"
rm -rf "${resources_folder}/NvimServer"
rm -rf "${resources_folder}/runtime"
# Build NvimServer and copy
build_libnvim=true ./NvimServer/NvimServer/bin/build_nvimserver.sh
cp ./NvimServer/.build/apple/Products/Release/NvimServer "${resources_folder}"
# Create and copy runtime folder
install_path="$(/usr/bin/mktemp -d -t 'nvim-runtime')"
nvim_install_path="${install_path}" ./NvimServer/NvimServer/bin/build_runtime.sh
cp -r "${install_path}/share/nvim/runtime" "${resources_folder}"
# Copy VimR specific vim file to runtime/plugin folder
cp "${resources_folder}/com.qvacua.NvimView.vim" "${resources_folder}/runtime/plugin"
}
main () {
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
echo "### Building VimR nightly"
./bin/build_vimr.sh
local -r build_path="./build"
# 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
prepare_nvimserver
echo "### Xcodebuilding"
rm -rf ${build_path}
xcodebuild \
-configuration Release -derivedDataPath ${build_path} \
-workspace VimR.xcworkspace -scheme VimR \
clean build
if [[ "${code_sign}" == true ]]; then
local -r -x vimr_app_path="${build_path}/Build/Products/Release/VimR.app"
./bin/sign_vimr.sh
fi
pushd "${build_path}/Build/Products/Release" >/dev/null
tar cjf "VimR-neovim-nightly-unsigned.tar.bz2" VimR.app
echo "### VimR nightly packaged to ${build_path}/Build/Products/ReleaseVimR-neovim-nightly-unsigned.tar.bz2"