1
1
mirror of https://github.com/qvacua/vimr.git synced 2025-01-02 10:43:41 +03:00

Merge branch 'master' into update-neovim

This commit is contained in:
Tae Won Ha 2022-11-20 11:26:29 +01:00
commit a3e5c5e403
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
4 changed files with 13 additions and 60 deletions

View File

@ -1129,6 +1129,7 @@
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20221115.195322;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@ -1190,6 +1191,7 @@
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20221115.195322;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;

View File

@ -1,6 +1,7 @@
#!/bin/bash
set -Eeuo pipefail
readonly strip_symbols=${strip_symbols:-true}
readonly notarize=${notarize:?"true or false"}
readonly use_carthage_cache=${use_carthage_cache:?"true or false"}
readonly clean=${clean:?"true or false"}
@ -52,8 +53,13 @@ main () {
local -r build_path="./build"
build_vimr "${build_path}"
local -r -x vimr_app_path="${build_path}/Build/Products/Release/VimR.app"
if [[ "${strip_symbols}" == true ]]; then
strip -rSTx "${vimr_app_path}/Contents/MacOS/VimR"
fi
if [[ "${notarize}" == true ]]; then
local -r -x vimr_app_path="${build_path}/Build/Products/Release/VimR.app"
./bin/sign_vimr.sh
./bin/notarize_vimr.sh
fi

View File

@ -8,21 +8,12 @@ main() {
echo "### Notarizing"
ditto -c -k --keepParent VimR.app VimR.app.zip
echo "#### Uploading"
local -x request_uuid
request_uuid=$(xcrun altool --notarize-app --primary-bundle-id "com.qvacua.VimR" --username "hataewon@gmail.com" --password "@keychain:dev-notar" --file VimR.app.zip | grep RequestUUID | sed -E 's/.* = (.*)/\1/')
readonly request_uuid
echo "#### Uploaded"
echo "Use 'xcrun altool --notarization-history 0 -u hataewon@gmail.com -p @keychain:dev-notar' or"
echo "'xcrun altool --notarization-info ${request_uuid} -u hataewon@gmail.com -p @keychain:dev-notar'"
echo "#### Notarizing"
xcrun notarytool submit VimR.app.zip \
--keychain-profile "apple-dev-notar" \
--wait
popd >/dev/null
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
echo "#### Waiting for notarization ${request_uuid} to finish"
./bin/wait_for_notarization.py
popd </dev/null
pushd "${vimr_app_path}/.." >/dev/null
xcrun stapler staple VimR.app
echo "### Notarization finished"

View File

@ -1,46 +0,0 @@
#!/usr/bin/env python3
from waiting import wait, TimeoutExpired
import os
import subprocess
def check_status(request_uuid: str) -> bool:
proc = subprocess.run(
f"xcrun altool --notarization-info {request_uuid} -u hataewon@gmail.com -p @keychain:dev-notar".split(),
capture_output=True
)
lines = proc.stdout.decode("utf-8").split("\n")
success = [line for line in lines if "Status: success" in line]
inprog = [line for line in lines if "Status: in progress" in line]
invalid = [line for line in lines if "Status: invalid" in line]
if invalid:
print("### ERROR: notarization unsuccessful!")
exit(1)
if success:
print("### Notarization successful")
return True
if inprog:
print("### Notarization in progress")
return False
print("### Notarization status unclear, probably in progress")
return False
if __name__ == "__main__":
request_uuid = os.environ["request_uuid"]
print(f"### Waiting for request {request_uuid}")
try:
wait(lambda: check_status(request_uuid), timeout_seconds=60*60, sleep_seconds=30)
except TimeoutExpired:
print("### ERROR: Timeout of 1h!")
exit(1)
except Exception as err:
print(f"### ERROR: err")
exit(1)