Add xcodebuild output formatter with config file support - #3
Merged
Conversation
- Auto-detects xcbeautify or xcpretty availability - Streams xcodebuild output in real-time when verbose mode enabled - Falls back to plain streaming if no formatter available - Supports piping through formatters for colored, formatted output
- Update execute method to support streaming and formatter options - Add use_formatter parameter to execute_archive and execute_create_xcframework - Stream output in real-time when verbose mode is enabled - Preserve backward compatibility with existing code
- Add verbose and use_formatter to build defaults - Update schema to validate new build options - verbose: boolean to enable verbose output - use_formatter: boolean or string to control output formatting
- Update CLI to read verbose setting from config file - CLI options override config file settings - Pass use_formatter option through orchestrator to archiver - Archiver forwards options to xcodebuild wrapper - Enable real-time build logs via config file
- Add verbose and use_formatter to basic.yml example - Enable verbose mode in SwiftyBeaver example config - Document formatter options (true, false, or specific formatter name)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds real-time xcodebuild output streaming with automatic formatter detection (xcbeautify/xcpretty) and configuration file support for verbose mode.
Changes
1. Xcodebuild Output Formatter
lib/xcframework_cli/xcodebuild/formatter.rbxcbeautifyorxcprettyavailability2. Wrapper Integration
lib/xcframework_cli/xcodebuild/wrapper.rbuse_formatterparameter to archive and create-xcframework commands3. Configuration Support
lib/xcframework_cli/config/defaults.rbverbose: falseanduse_formatter: truedefaultslib/xcframework_cli/config/schema.rb4. Build Pipeline Integration
lib/xcframework_cli/cli/commands/build.rblib/xcframework_cli/builder/orchestrator.rbuse_formatteroption to archiverlib/xcframework_cli/builder/archiver.rb5. Documentation
config/examples/basic.ymlExample/SwiftyBeaver/.xcframework.ymlUsage
Via Config File (New!)
```yaml
build:
verbose: true # Enable verbose output
use_formatter: true # Use xcbeautify/xcpretty
```
```bash
./bin/xcframework-cli build --config .xcframework.yml
```
Via CLI Flag (Existing)
```bash
./bin/xcframework-cli build --project MySDK.xcodeproj --verbose
```
What You See
✅ Real-time build logs:
✅ Automatic formatter detection:
✅ Color-coded output:
Testing
✅ 109 unit tests - All passing
✅ Config file mode - Verbose works from config
✅ CLI override - CLI flags override config settings
✅ Formatter detection - xcbeautify auto-detected
✅ Real-time streaming - Build logs appear as they happen
Breaking Changes
None. All changes are backward compatible.