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:
commit
a3e5c5e403
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user