From f2c6f569d4d53459d8ff33a0bed908e0fe6ca1b5 Mon Sep 17 00:00:00 2001 From: Jeon Suyeol Date: Mon, 21 Sep 2026 10:49:41 +0900 Subject: [PATCH] Drive local builds through tuist xcodebuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `tuist build` is deprecated in favor of the `tuist xcodebuild` wrapper, so `make build`/`make run` printed a deprecation warning on every invocation. `tuist xcodebuild` is a thin wrapper around xcodebuild and does not generate the project, so `build` and `test` now depend on `generate` — which `tuist build` used to do implicitly, and which `test` never did at all. Derived data is pinned to `.build/DerivedData` (already gitignored) so `run` can point at the built app directly instead of globbing Xcode's hashed DerivedData directory, which silently picks an arbitrary match when more than one exists. `test` moves to `tuist xcodebuild test` for the same reason, and drops the `| xcpretty` pipe: tuist already formats the output, and the pipe swallowed xcodebuild's exit code so failing tests could not fail the target. CI is untouched; it calls xcodebuild directly with signing disabled. --- AGENTS.md | 6 ++++-- Makefile | 22 ++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 12e5f07..0e14b98 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,14 +9,16 @@ macOS menu-bar dictionary app (올ㅋ사전). Built with Tuist, signed with fast ```bash make install # tuist install (resolve dependencies) make generate # tuist generate --no-open -make build # tuist build Allkdic +make build # generate + tuist xcodebuild build make run # build and run (logs to terminal) -make test # run unit tests +make test # generate + tuist xcodebuild test make lint # swiftformat --lint make format # swiftformat make clean # tuist clean ``` +`build` and `test` depend on `generate`, then drive the generated workspace through `tuist xcodebuild` (plain `xcodebuild` plus Tuist insights). `tuist build` is deprecated and must not be reintroduced. Build products go to the pinned `.build/DerivedData` (gitignored), which is where `make run` looks for `Allkdic.app`. + The scheme and workspace are both named `Allkdic`. Version lives in `Allkdic/Allkdic-Info.plist` (`CFBundleShortVersionString` + `CFBundleVersion`), which `Project.swift` references via `infoPlist: .file(...)`. ## Release diff --git a/Makefile b/Makefile index d35ec65..05ef043 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,14 @@ # make release # App Store 배포 (로컬) # make release-ci # App Store 배포 (CI, 환경변수 사용) -.PHONY: install generate build run test clean lint format bump release release-ci +.PHONY: install generate build run test clean lint lint-ci format bump release release-ci + +# `tuist build` is deprecated; the supported path is to generate the project and +# drive it through the `tuist xcodebuild` wrapper (plain xcodebuild plus Tuist +# insights). DERIVED_DATA is pinned so `run` knows exactly where the .app lands +# instead of globbing Xcode's hashed DerivedData directory. +XCODEBUILD_FLAGS = -workspace Allkdic.xcworkspace -scheme Allkdic -configuration Debug -destination 'platform=macOS' +DERIVED_DATA = .build/DerivedData install: tuist install @@ -20,15 +27,14 @@ install: generate: tuist generate --no-open -build: - tuist build Allkdic +build: generate + tuist xcodebuild build $(XCODEBUILD_FLAGS) -derivedDataPath $(DERIVED_DATA) -run: - @tuist build Allkdic - @~/Library/Developer/Xcode/DerivedData/Allkdic-*/Build/Products/Debug/Allkdic.app/Contents/MacOS/Allkdic +run: build + @$(DERIVED_DATA)/Build/Products/Debug/Allkdic.app/Contents/MacOS/Allkdic -test: - xcodebuild test -workspace Allkdic.xcworkspace -scheme Allkdic -destination 'platform=macOS' | xcpretty +test: generate + tuist xcodebuild test $(XCODEBUILD_FLAGS) -derivedDataPath $(DERIVED_DATA) clean: tuist clean