Closed mr-casual closed 8 years ago
This is not possible since gym
is actually made to build and archive. See the discussion in this PR on why it is not possible and how you can use xcodebuild
to do so.
Ok, I already thought so :/
We have a jenkins job, which runs all unit tests and builds the project for every pull-request. For that job (lane) I don't want to have code signing or archiving as well.
My current solution looks like this:
sh "set -o pipefail && xcodebuild build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -workspace '../MyApp.xcworkspace' -scheme 'MyApp'-destination 'generic/platform=iOS' | tee ~/Library/Logs/gym/MyApp-MyApp.log | xcpretty"
Why don't you use scan
for the testing instead of xcodebuild? Seems more appropriate for you.
We use both. First scan
and then just a normal build.
I think scan
will do something like this xcodebuild test -workspace '**' -scheme '**' ...
. But this will only build the test target and not the whole project.
Correct me if I'm wrong.
Because I wanted to get rid of this shell command, I use the xcodebuild
action now.
lane :build do |options|
xcodebuild(
workspace: "MyApp.xcworkspace",
scheme: "MyApp",
configuration: "Debug",
clean: options[:clean],
build: true,
destination: "generic/platform=iOS\" CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=\""
)
end
But it is still a bit hacky, because the parameters CODE_SIGNING_REQUIRED and CODE_SIGN_IDENTITY are currently not supported for the xcodebuild action.
If I had the wish to add these parameters to the xcodebuild
action, then this ticket should be a feature request for fastlane right?
This issue was migrated to https://github.com/fastlane/fastlane/issues/1816. Please post all further comments there.
fastlane
is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket:
Can I just build the project without archive and export ?
I want something like this:
xcodebuild build -workspace 'MyApp.xcworkspace' -scheme 'MyApp' -destination 'generic/platform=iOS' | tee /Users/me/Library/Logs/gym/MyApp-MyApp.log | xcpretty