liftoffcli / liftoff

CLI for creating and configuring new Xcode projects
MIT License
1.6k stars 106 forks source link

Liftofff is adding the last build setting specified as an object #237

Open solrankos opened 8 years ago

solrankos commented 8 years ago

I'm running liftoff from a Java webservice with Java Runtime. I Tested to move my extra_configs around but it's always the last one that gets parsed weirdly. Everything works fine when i run the same template from the commandline.

extra_config:
    Debug:
        HOCKEY_APP_ID:
        GCC_PREPROCESSOR_DEFINITIONS:
            - $(inherited)
            - HOCKEY_APP_ID=$(HOCKEY_APP_ID)
        SWIFT_OBJC_BRIDGING_HEADER:
            - Resources/OtherSources/$(PROJECT_NAME)-Bridging-Header.h
    Release:
        HOCKEY_APP_ID:
            - 8b5edca942c706cbc04e8d7f36bd9338
        GCC_PREPROCESSOR_DEFINITIONS:
            - $(inherited)
            - HOCKEY_APP_ID=$(HOCKEY_APP_ID)
        SWIFT_OBJC_BRIDGING_HEADER:
            - Resources/OtherSources/$(PROJECT_NAME)-Bridging-Header.h
        OSCARS_SETTING:
            - Hej

skarmavbild 2015-08-27 kl 11 13 24 Another example:

extra_config:
    Debug:
        HOCKEY_APP_ID:
        GCC_PREPROCESSOR_DEFINITIONS:
            - $(inherited)
            - HOCKEY_APP_ID=$(HOCKEY_APP_ID)
    Release:
        HOCKEY_APP_ID:
            - 8b5edca942c706cbc04e8d7f36bd9338
        GCC_PREPROCESSOR_DEFINITIONS:
            - $(inherited)
            - HOCKEY_APP_ID=$(HOCKEY_APP_ID)
    all:
        SWIFT_OBJC_BRIDGING_HEADER:
            - Resources/OtherSources/$(PROJECT_NAME)-Bridging-Header.h

skarmavbild 2015-08-27 kl 11 15 57

solrankos commented 8 years ago

Somehow changing the order of extra_configand run_script_phases, putting it last. fixed the issue.

extra_config:
    Debug:
        HOCKEY_APP_ID:
        GCC_PREPROCESSOR_DEFINITIONS:
            - $(inherited)
            - HOCKEY_APP_ID=$(HOCKEY_APP_ID)
        SWIFT_OBJC_BRIDGING_HEADER:
            - Resources/OtherSources/$(PROJECT_NAME)-Bridging-Header.h
    Release:
        HOCKEY_APP_ID:
            - 8b5edca942c706cbc04e8d7f36bd9338
        GCC_PREPROCESSOR_DEFINITIONS:
            - $(inherited)
            - HOCKEY_APP_ID=$(HOCKEY_APP_ID)
        SWIFT_OBJC_BRIDGING_HEADER:
            - Resources/OtherSources/$(PROJECT_NAME)-Bridging-Header.h

run_script_phases:
    - file: todo.sh
      name: Warn for TODO and FIXME comments
    - file: xcres_build.sh
      name: Generate constants file of resources, images, strings etc.
    - file: sort-xcode-proj.sh
      name: Sort files in groups alphabetically to avoid merge conflicts
    - file: annotate_bundle_icons.sh
      name: Annotate bundle icons with configuration and commit number
    # (Needs more evaluation) - objclean.sh: Apply ObjectiveClean style guides
jakecraige commented 8 years ago

Thanks for reporting this with a workaround. I'm not sure what would cause this off hand.

It looks like it's not parsing the environment variables correctly?