new features
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Source from the project root. A binary framework change needs fresh compiled
|
||||
# modules and object files, even if the framework keeps the same module name.
|
||||
base="${AISTUDIO_BUILD_ROOT:-/private/tmp/AIStudio-build-$(id -u)}"
|
||||
runtime_key="$(shasum -a 256 Dependencies/LlamaRuntime/Package.swift | cut -d ' ' -f 1)"
|
||||
derived="$base/Derived-$runtime_key"
|
||||
+4
-4
@@ -11,12 +11,12 @@ case "$configuration" in
|
||||
Debug|Release) ;;
|
||||
*) echo "Usage: $0 [Debug|Release] [--no-launch]" >&2; exit 2 ;;
|
||||
esac
|
||||
base="${AISTUDIO_BUILD_ROOT:-/private/tmp/AIStudio-build-$(id -u)}"
|
||||
source Scripts/build-paths.sh
|
||||
mkdir -p "$base"
|
||||
xcodebuild ARCHS=arm64 CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= -project AIStudio.xcodeproj -scheme AIStudio -configuration "$configuration" \
|
||||
-destination 'platform=macOS,arch=arm64' -derivedDataPath "$base/Derived" \
|
||||
xcodebuild ARCHS=arm64 ENABLE_HARDENED_RUNTIME=NO CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= -project AIStudio.xcodeproj -scheme AIStudio -configuration "$configuration" \
|
||||
-destination 'platform=macOS,arch=arm64' -derivedDataPath "$derived" \
|
||||
-clonedSourcePackagesDirPath "$base/Packages" -disablePackageRepositoryCache build
|
||||
app="$base/Derived/Build/Products/$configuration/AIStudio.app"
|
||||
app="$derived/Build/Products/$configuration/AIStudio.app"
|
||||
printf 'App: %s\n' "$app"
|
||||
if [[ "$launch" != "--no-launch" ]]; then
|
||||
open -n "$app"
|
||||
|
||||
+6
-4
@@ -5,19 +5,21 @@ if [[ -n "${NOTARY_PROFILE:-}" && -z "${SIGN_IDENTITY:-}" ]]; then
|
||||
echo "Notarization requires SIGN_IDENTITY." >&2
|
||||
exit 2
|
||||
fi
|
||||
export AISTUDIO_BUILD_ROOT="${AISTUDIO_BUILD_ROOT:-/private/tmp/AIStudio-build-$(id -u)}"
|
||||
destination="${1:-$AISTUDIO_BUILD_ROOT/dist}"
|
||||
source Scripts/build-paths.sh
|
||||
destination="${1:-$base/dist}"
|
||||
./Scripts/build.sh Release --no-launch
|
||||
stage="$(mktemp -d "$AISTUDIO_BUILD_ROOT/release.XXXXXXXX")"
|
||||
stage="$(mktemp -d "$base/release.XXXXXXXX")"
|
||||
trap 'rm -rf -- "$stage"' EXIT
|
||||
app="$stage/AIStudio.app"
|
||||
ditto "$AISTUDIO_BUILD_ROOT/Derived/Build/Products/Release/AIStudio.app" "$app"
|
||||
ditto "$derived/Build/Products/Release/AIStudio.app" "$app"
|
||||
if [[ "$(xcrun lipo -archs "$app/Contents/MacOS/AIStudio")" != "arm64" ]]; then
|
||||
echo "Expected an arm64-only release executable." >&2
|
||||
exit 1
|
||||
fi
|
||||
version="$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "$app/Contents/Info.plist")"
|
||||
if [[ -n "${SIGN_IDENTITY:-}" ]]; then
|
||||
# The hardened app and its embedded framework must share a signing team.
|
||||
codesign --force --timestamp --options runtime --sign "$SIGN_IDENTITY" "$app/Contents/Frameworks/llama.framework"
|
||||
codesign --force --timestamp --options runtime --sign "$SIGN_IDENTITY" "$app"
|
||||
else
|
||||
codesign --force --sign - "$app"
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
base="${AISTUDIO_BUILD_ROOT:-/private/tmp/AIStudio-build-$(id -u)}"
|
||||
source Scripts/build-paths.sh
|
||||
mkdir -p "$base"
|
||||
results="$(mktemp -d "$base/test.XXXXXXXX")"
|
||||
if [[ -z "${TEST_RUNNER_AISTUDIO_TEST_MCP_URLS:-}" || -z "${TEST_RUNNER_AISTUDIO_TEST_OLLAMA_FIXTURE_URL:-}" || -z "${TEST_RUNNER_AISTUDIO_TEST_OLLAMA_GATEWAY_URL:-}" || -z "${TEST_RUNNER_AISTUDIO_TEST_COMPATIBLE_URL:-}" || -z "${TEST_RUNNER_AISTUDIO_TEST_WEB_URL:-}" ]]; then
|
||||
@@ -32,6 +32,6 @@ export TEST_RUNNER_AISTUDIO_TEST_STDIO_PYTHON="$(command -v python3)"
|
||||
export TEST_RUNNER_AISTUDIO_TEST_STDIO_FIXTURE="$PWD/Tests/Fixtures/stdio_server.py"
|
||||
|
||||
xcodebuild CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= -project AIStudio.xcodeproj -scheme AIStudio -configuration Debug \
|
||||
-destination 'platform=macOS,arch=arm64' -derivedDataPath "$base/Derived" \
|
||||
-destination 'platform=macOS,arch=arm64' -derivedDataPath "$derived" \
|
||||
-clonedSourcePackagesDirPath "$base/Packages" -disablePackageRepositoryCache \
|
||||
-parallel-testing-enabled NO -resultBundlePath "$results/AIStudio.xcresult" test
|
||||
|
||||
Reference in New Issue
Block a user