How can I limit a “Run Script” build phase to my release configuration?

后端 未结 2 927
独厮守ぢ
独厮守ぢ 2021-01-29 19:41

I have a shell script that I would like to run at the end of my target\'s build phase. However, I would like this script to only run when I build with the release

相关标签:
2条回答
  • 2021-01-29 20:24

    The easiest way to do this, is checking the "Run script only when installing" checkbox.

    0 讨论(0)
  • 2021-01-29 20:42
    if [ "${CONFIGURATION}" = "Release" ]; then
      echo Do something really release-like
    fi
    

    The script will run at the end of every configuration, but it won't do anything in this case unless the configuration is Release (assuming everything it does is contained within the test block).

    0 讨论(0)
提交回复
热议问题