Xcode 10 Build Phase Shell Script

后端 未结 4 1188
甜味超标
甜味超标 2021-02-10 02:54

In our project we derive our release version from git tag etc then write it to the built folder\'s Info.plist with a shell script like:

GIT_RELEASE_VERSION=$(some

4条回答
  •  执念已碎
    2021-02-10 03:10

    Similar to the answers above (can't comment yet) but slightly changed.

    Scripts input files:

    $(PROJECT_DIR)/$(INFOPLIST_FILE)      
    $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
    

    Output files:

    $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
    

    I created a gist with a script I use to set the bundle version and some extra info like tag, date, branch.

    https://gist.github.com/JoeMatt/aedd459c54a383373231719e508a2a36

提交回复
热议问题