mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
11651bcd23
XcodeGen (through XcodeProj) serializes schemes slightly differently to Xcode, so Xcode rewrites them as soon as it touches them (running tests, switching test plans, opening the scheme editor), leaving recurring local changes behind. Add a small Swift script, run from XcodeGen's postGenCommand, that rewrites the generated schemes the way Xcode saves them: it drops default-valued attributes and empty CommandLineArguments, orders TestPlanReference attributes, and moves TestPlans to the end of the TestAction, omitting the redundant empty Testables. Regenerated schemes are byte-identical to the copies saved by Xcode. The script can be removed once https://github.com/tuist/XcodeProj/pull/1189 ships in XcodeGen.
10 lines
322 B
Bash
10 lines
322 B
Bash
#!/bin/bash
|
|
|
|
# This script is invoked by xcodegen for running post commands
|
|
|
|
# Move file header template in project shared data folder
|
|
cp IDETemplateMacros.plist ../../ElementX.xcodeproj/xcshareddata/
|
|
|
|
# Rewrite schemes the way Xcode saves them
|
|
swift normalizeSchemes.swift ../../ElementX.xcodeproj/xcshareddata/xcschemes
|