2

From my script in "Run Script" under the Project > Target > Build Phases is there a way to know which build configuration you have run I want to copy some private bundle files if it's the Debug build config, but not copy them if it's the Release config. Is there a way to either set an Env Variable in the Build Config, or simply get the name of the build config when running?

Thanks!

jpswain
  • 14,642
  • 8
  • 58
  • 63

1 Answers1

3

This worked for me:

if [[ "$CONFIGURATION" == "Debug" ]]
then
    echo "Copying ./BundlePrivate b/c BuildConfiguration=$CONFIGURATION"
    ditto ./BundlePrivate/ "$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"
else
    echo "Not copying ./BundlePrivate b/c BuildConfiguration=$CONFIGURATION"
fi
jpswain
  • 14,642
  • 8
  • 58
  • 63