@@ -731,35 +731,40 @@ is available in the $BITRISE_IDEDISTRIBUTION_LOGS_PATH environment variable`)
731731
732732 appDSYM , frameworkDSYMs , err := xcarchive .FindDSYMs (tmpArchivePath )
733733 if err != nil {
734- fail ("Failed to export dsyms, error: %s" , err )
735- }
736-
737- dsymDir , err := pathutil .NormalizedOSTempDirPath ("__dsyms__" )
738- if err != nil {
739- fail ("Failed to create tmp dir, error: %s" , err )
734+ if err .Error () == "no dsym found" {
735+ log .Warnf ("no app nor framework dsyms found" )
736+ } else {
737+ fail ("Failed to export dsyms, error: %s" , err )
738+ }
740739 }
740+ if err == nil {
741+ dsymDir , err := pathutil .NormalizedOSTempDirPath ("__dsyms__" )
742+ if err != nil {
743+ fail ("Failed to create tmp dir, error: %s" , err )
744+ }
741745
742- if err := command .CopyDir (appDSYM , dsymDir , false ); err != nil {
743- fail ("Failed to copy (%s) -> (%s), error: %s" , appDSYM , dsymDir , err )
744- }
746+ if err := command .CopyDir (appDSYM , dsymDir , false ); err != nil {
747+ fail ("Failed to copy (%s) -> (%s), error: %s" , appDSYM , dsymDir , err )
748+ }
745749
746- if configs .ExportAllDsyms == "yes" {
747- for _ , dsym := range frameworkDSYMs {
748- if err := command .CopyDir (dsym , dsymDir , false ); err != nil {
749- fail ("Failed to copy (%s) -> (%s), error: %s" , dsym , dsymDir , err )
750+ if configs .ExportAllDsyms == "yes" {
751+ for _ , dsym := range frameworkDSYMs {
752+ if err := command .CopyDir (dsym , dsymDir , false ); err != nil {
753+ fail ("Failed to copy (%s) -> (%s), error: %s" , dsym , dsymDir , err )
754+ }
750755 }
751756 }
752- }
753757
754- if err := utils .ExportOutputDir (dsymDir , dsymDir , bitriseDSYMDirPthEnvKey ); err != nil {
755- fail ("Failed to export %s, error: %s" , bitriseDSYMDirPthEnvKey , err )
756- }
758+ if err := utils .ExportOutputDir (dsymDir , dsymDir , bitriseDSYMDirPthEnvKey ); err != nil {
759+ fail ("Failed to export %s, error: %s" , bitriseDSYMDirPthEnvKey , err )
760+ }
757761
758- log .Donef ("The dSYM dir path is now available in the Environment Variable: %s (value: %s)" , bitriseDSYMDirPthEnvKey , dsymDir )
762+ log .Donef ("The dSYM dir path is now available in the Environment Variable: %s (value: %s)" , bitriseDSYMDirPthEnvKey , dsymDir )
759763
760- if err := utils .ExportOutputDirAsZip (dsymDir , dsymZipPath , bitriseDSYMPthEnvKey ); err != nil {
761- fail ("Failed to export %s, error: %s" , bitriseDSYMPthEnvKey , err )
762- }
764+ if err := utils .ExportOutputDirAsZip (dsymDir , dsymZipPath , bitriseDSYMPthEnvKey ); err != nil {
765+ fail ("Failed to export %s, error: %s" , bitriseDSYMPthEnvKey , err )
766+ }
763767
764- log .Donef ("The dSYM zip path is now available in the Environment Variable: %s (value: %s)" , bitriseDSYMPthEnvKey , dsymZipPath )
768+ log .Donef ("The dSYM zip path is now available in the Environment Variable: %s (value: %s)" , bitriseDSYMPthEnvKey , dsymZipPath )
769+ }
765770}
0 commit comments