version: "3" vars: PORT: 8787 # The app's data is a product of the taxonomy pipeline: cdn/export.py there, published by its task cdn:deploy. DATA: ../taxonomy/data/cdn SIM: "iPhone 17 Pro" tasks: project: desc: Generate Bloom.xcodeproj from project.yml cmds: - mkdir -p Snapshot - xcodegen generate --quiet data: desc: Link cdn/ to the taxonomy repo's export (task cdn:export there), beside the local install page status: ["test -L cdn/v && test -L cdn/manifest.json"] cmds: - test -f {{.DATA}}/manifest.json || (echo "no {{.DATA}}/manifest.json -- run task cdn:export in ../taxonomy" && exit 1) - mkdir -p cdn - ln -sfn "$(cd {{.DATA}} && pwd)/v" cdn/v - ln -sfn "$(cd {{.DATA}} && pwd)/manifest.json" cdn/manifest.json serve: desc: Serve the local export (and the install page) at http://localhost:{{.PORT}}, for the Local data source deps: [data] cmds: - "python3 -m http.server {{.PORT}} --directory cdn --bind 0.0.0.0" bundle: desc: Copy the exported core into Snapshot/ so the app starts without a server deps: [data] cmds: - rm -rf Snapshot && mkdir -p Snapshot - | V=$(python3 -c "import json; print(json.load(open('cdn/manifest.json'))['base'])") cp "cdn/$V/core.sqlite" Snapshot/ && cp cdn/manifest.json Snapshot/ test: desc: BloomKit tests (the export-backed ones run when cdn/ exists) dir: BloomKit cmds: - "swift test" build: desc: Build the app for the simulator deps: [project] cmds: - xcodebuild -project Bloom.xcodeproj -scheme Bloom -destination 'platform=iOS Simulator,name={{.SIM}}' -derivedDataPath build -quiet build ota: desc: Build for a phone on the tailnet and publish an install page beside the data (needs task serve) deps: [project] cmds: - scripts/ota.sh testflight: desc: Archive a Release build and upload it to App Store Connect for TestFlight deps: [project, bundle] cmds: - scripts/testflight.sh