Closed dangthaison91 closed 5 years ago
Pre-actions unfortunately cannot stop or fail the build itself.
What might improve your CI builds is to call natrium from your build pipeline itself.
For example (in .travis.yml
):
language: objective-c
osx_image: xcode10
script:
- ./natrium -c Release -e Production -t App -p $TRAVIS_BUILD_DIR
- xcodebuild ... etc
Even during development, it's nice to see if last generation was successful. What about creation of extra build step, which will check if there was an error during generation? And build step can fail build as expected.
If a fatalError occurs the Logger will write an #error
to Natrium.swift
, which will be picked up by xcode's build system at build time (after the pre-action)
When using Natrium, many times it implicitly failed at local but build still success cause xcconfig files already generated before. This often takes time to check why CI build failed and notice to check Natrium's log.
I'm not sure if once Natrium fails can it make Pre-Action fail the following Build will be failed? If not we can remove all xcconfig files before generating a new one.