Closed rameerez closed 3 years ago
I wonder if it's possible to detect if the current configuration is "release build type" without matching on the name.
Any thoughts on this? (From the issue). Would be a much better solution if possible.
Hello! I just ran into #50 as well after making a separate "Not App Store" release config for notarized distribution. Hoping we might be able to get this fixed up and merged...
Looking into the question @sindresorhus asked above about whether there was a way to switch on "debug vs. release" other than by name matching the build config, I dumped the ENV variables for release, debug, and a custom debug scheme and I think the best solution would be to use the $GCC_PREPROCESSOR_DEFINITIONS
value which appears to include DEBUG=1
whenever the build config is based on the default debug config (unless the developer has turned off Debug preprocessing for some reason).
There's also the $ONLY_ACTIVE_ARCH
flag which will be YES
for debug builds that are targeting a single arch and NO
for release builds meant to be copied and distributed. That might be a bit more reliable though I'm not enough of a GCC expert to say 100% whether there are edge cases with this flag.
I guess it's good form to do your own PR rather than drive-by'ing someone else's. Will spin one up based on this one.
Closing in favor of #57
LaunchAtLogin
made the assumption that production releases were built using a configuration namedRelease
, but it's often helpful to use other configuration names, likeRelease-MAS
. This prevented the copy helper script from removing theLaunchAtLogin_LaunchAtLogin.bundle
on such releases, making the notarization process fail.Made the script remove the bundle on all builds except those using a configuration named explicitly
Debug
and added the new assumption to the Readme FAQ.This should fix #50.