Skip to content

Commit 846199d

Browse files
authored
optional dsyms, godeps-update (#68)
1 parent 4b3c926 commit 846199d

File tree

3 files changed

+35
-30
lines changed

3 files changed

+35
-30
lines changed

Godeps/Godeps.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.go

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

vendor/github.com/kballard/go-shellquote/quote.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)