mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 10:29:58 +02:00
build(apple): stop tracking generated localization outputs
Localizable.xcstrings and Generated/L10n.swift are generated from localization/strings.json — the single source of truth — yet were committed, which caused redundant tracking and a spurious ~10k-line diff every time Xcode reformatted the catalog on build. Treat them like the (already gitignored) Rust bindings: generate at build time instead of tracking them. gitignore both; make the `apple-project` target depend on `localization` so `bun run generate` recreates them before xcodegen; install Bun in the Apple CI job and trigger it on localization/**. Android strings.xml stays tracked — it has no reformatting churn and its build doesn't run the generator.
This commit is contained in:
7
.github/workflows/apple.yml
vendored
7
.github/workflows/apple.yml
vendored
@@ -12,6 +12,7 @@ on:
|
|||||||
- "config.mk"
|
- "config.mk"
|
||||||
- "make/**"
|
- "make/**"
|
||||||
- ".github/workflows/apple.yml"
|
- ".github/workflows/apple.yml"
|
||||||
|
- "localization/**"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
@@ -25,6 +26,7 @@ on:
|
|||||||
- "config.mk"
|
- "config.mk"
|
||||||
- "make/**"
|
- "make/**"
|
||||||
- ".github/workflows/apple.yml"
|
- ".github/workflows/apple.yml"
|
||||||
|
- "localization/**"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -63,5 +65,10 @@ jobs:
|
|||||||
- name: Install XcodeGen
|
- name: Install XcodeGen
|
||||||
run: brew install xcodegen
|
run: brew install xcodegen
|
||||||
|
|
||||||
|
- name: Install Bun
|
||||||
|
# The Apple l10n catalog (Localizable.xcstrings) and L10n.swift are
|
||||||
|
# generated from localization/strings.json at build time, not tracked.
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
- name: Build and test Apple app
|
- name: Build and test Apple app
|
||||||
run: make check-apple
|
run: make check-apple
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -113,7 +113,7 @@ apple-core: ## Build the Rust XCFramework and generated Swift bindings.
|
|||||||
@test "$(HOST_OS)" = macos || { printf 'Apple builds require macOS.\n' >&2; exit 1; }
|
@test "$(HOST_OS)" = macos || { printf 'Apple builds require macOS.\n' >&2; exit 1; }
|
||||||
cd $(ROOT) && apple/scripts/build-core.sh $(APPLE_PROFILE)
|
cd $(ROOT) && apple/scripts/build-core.sh $(APPLE_PROFILE)
|
||||||
|
|
||||||
apple-project: apple-core ## Generate the native Apple Xcode project.
|
apple-project: apple-core localization ## Generate the native Apple Xcode project.
|
||||||
cd $(ROOT)/apple && $(XCODEGEN) generate
|
cd $(ROOT)/apple && $(XCODEGEN) generate
|
||||||
|
|
||||||
open-apple-project: apple-project ## Generate and open the native Apple Xcode project.
|
open-apple-project: apple-project ## Generate and open the native Apple Xcode project.
|
||||||
|
|||||||
4
apple/.gitignore
vendored
4
apple/.gitignore
vendored
@@ -3,6 +3,10 @@
|
|||||||
VnidropCore/vnidrop.xcframework/
|
VnidropCore/vnidrop.xcframework/
|
||||||
VnidropCore/Sources/VnidropCore/Vnidrop.swift
|
VnidropCore/Sources/VnidropCore/Vnidrop.swift
|
||||||
|
|
||||||
|
# Generated from localization/strings.json (cd localization && bun run src/cli.ts generate)
|
||||||
|
VniDrop/Resources/Localizable.xcstrings
|
||||||
|
VniDrop/Generated/
|
||||||
|
|
||||||
# Generated by XcodeGen from project.yml
|
# Generated by XcodeGen from project.yml
|
||||||
VniDrop.xcodeproj/
|
VniDrop.xcodeproj/
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,9 @@
|
|||||||
# XcodeGen spec for the native SwiftUI VniDrop app (iOS/iPadOS/macOS).
|
# XcodeGen spec for the native SwiftUI VniDrop app (iOS/iPadOS/macOS).
|
||||||
# Regenerate the project with: xcodegen generate (run from apple/)
|
# Regenerate the project with: xcodegen generate (run from apple/)
|
||||||
# Requires the Rust core first: apple/scripts/build-core.sh debug
|
# Requires two generated inputs first (both gitignored), before xcodegen:
|
||||||
|
# - Rust core: apple/scripts/build-core.sh debug
|
||||||
|
# - Localization: (cd localization && bun run src/cli.ts generate)
|
||||||
|
# -> VniDrop/Resources/Localizable.xcstrings, VniDrop/Generated/L10n.swift
|
||||||
name: VniDrop
|
name: VniDrop
|
||||||
options:
|
options:
|
||||||
bundleIdPrefix: com.vnidrop
|
bundleIdPrefix: com.vnidrop
|
||||||
|
|||||||
Reference in New Issue
Block a user