XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

Support optional include

Open giginet opened this issue 6 years ago • 1 comments

Motivation

I want to add targets dynamically. including subspecs help me in the situation. The included spec is automatically generated and if not exists ignore adding targets.

Description

I added optional option to Include. This value indicates whether ignoring failure loading (e.g. the path does not exist).

include:
  - path: not_exist.yml
    optional: true
name: OptionalInclude
targets:
  IncludedTarget:
    type: application
    platform: iOS
    sources:
      - template

giginet avatar Nov 08 '19 16:11 giginet

@yonaskolb Following your comments I implemented a new strategy to cause errors. https://github.com/yonaskolb/XcodeGen/pull/712/commits/037d44b5c8987a3125d6498f0a64b819fd07d7cf

However, prior implementation seems to be simpler... How do you feel about?

giginet avatar Nov 10 '19 03:11 giginet