Cotton code
23 lines · 1.2 KB · ShellRaw
#!/usr/bin/env bash# Build the exact release-walk checkout's headless server and REAL simulator app under the caller's build lock.set -euo pipefailexport COTTON_FLAVOR=realBUILD="${1:?build directory}"cd "$BUILD/src". scripts/lib/cargo-path.shensure_cargo_on_path. scripts/lib/owned-root.shrefuse_wide_root 'release walk build products' "$BUILD". scripts/lib/derived-data.sh# Keep this exact-commit build in the walk's owned cache, through the shared resolver.export COTTON_DERIVED_DATA="$BUILD/derived"DERIVED="$(cotton_derived_data)"# Helpers only delete inside this newly owned worktree, never a household.cargo build --manifest-path crates/Cargo.toml -p cotton-ffi --bin cotton-headless -j 4cp "$CARGO_TARGET_DIR/debug/cotton-headless" "$BUILD/cotton-headless"bash scripts/build-xcframework.sh --debug --simulator-onlybash scripts/gen-ios-project.shxcodebuild build -project apps/cotton/Cotton.xcodeproj -scheme tinmen-cotton \  -configuration Debug -destination 'generic/platform=iOS Simulator' \  -derivedDataPath "$DERIVED" COTTON_FLAVOR=real COTTON_BUILD_COMMIT="$(git rev-parse HEAD)" ARCHS=arm64 ONLY_ACTIVE_ARCH=YES -jobs 4touch "$BUILD/complete"