Skip to content

Commit 2b0843e

Browse files
authored
Corrected output variable and filename of raw output log (#313)
* Updated messaging to indicate correct output variable and filename of raw output log * Make sure to use variable everywhere * Update export ipa path * Fix discrepancies between archive log and ipa export log
1 parent 9f4ef18 commit 2b0843e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

step/step.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ const (
5050
xcodebuildArchiveLogPathEnvKey = "BITRISE_XCODEBUILD_ARCHIVE_LOG_PATH"
5151
xcodebuildExportArchiveLogPathEnvKey = "BITRISE_XCODEBUILD_EXPORT_ARCHIVE_LOG_PATH"
5252
bitriseIDEDistributionLogsPthEnvKey = "BITRISE_IDEDISTRIBUTION_LOGS_PATH"
53+
xcodebuildArchiveLogFilename = "xcodebuild-archive.log"
54+
xcodebuildExportArchiveLogFilename = "xcodebuild-export-archive.log"
5355

5456
// Env Outputs
5557
bitriseAppDirPthEnvKey = "BITRISE_APP_DIR_PATH"
@@ -642,7 +644,7 @@ func (s XcodebuildArchiver) ExportOutput(opts ExportOpts) error {
642644
}
643645

644646
if opts.XcodebuildArchiveLog != "" {
645-
xcodebuildArchiveLogPath := filepath.Join(opts.OutputDir, "xcodebuild-archive.log")
647+
xcodebuildArchiveLogPath := filepath.Join(opts.OutputDir, xcodebuildArchiveLogFilename)
646648
if err := cleanup(xcodebuildArchiveLogPath); err != nil {
647649
return err
648650
}
@@ -655,13 +657,13 @@ func (s XcodebuildArchiver) ExportOutput(opts ExportOpts) error {
655657
}
656658

657659
if opts.XcodebuildExportArchiveLog != "" {
658-
xcodebuildExportArchiveLogPath := filepath.Join(opts.OutputDir, "xcodebuild-export-archive.log")
660+
xcodebuildExportArchiveLogPath := filepath.Join(opts.OutputDir, xcodebuildExportArchiveLogFilename)
659661
if err := cleanup(xcodebuildExportArchiveLogPath); err != nil {
660662
return err
661663
}
662664

663665
if err := ExportOutputFileContent(s.cmdFactory, opts.XcodebuildExportArchiveLog, xcodebuildExportArchiveLogPath, xcodebuildExportArchiveLogPathEnvKey); err != nil {
664-
s.logger.Warnf("Failed to export %s, error: %s", xcodebuildArchiveLogPathEnvKey, err)
666+
s.logger.Warnf("Failed to export %s, error: %s", xcodebuildExportArchiveLogPathEnvKey, err)
665667
} else {
666668
s.logger.Donef("The xcodebuild -exportArchive log path is now available in the Environment Variable: %s (value: %s)", xcodebuildExportArchiveLogPathEnvKey, xcodebuildExportArchiveLogPath)
667669
}
@@ -867,8 +869,8 @@ and use 'Export iOS and tvOS Xcode archive' step to export an App Clip.`, opts.S
867869
}
868870
s.logger.Printf(stringutil.LastNLines(xcodebuildLog, 20))
869871

870-
s.logger.Warnf(`You can find the last couple of lines of Xcode's build log above, but the full log will be also available in the raw-xcodebuild-output.log
871-
The log file will be stored in $BITRISE_DEPLOY_DIR, and its full path will be available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable.`)
872+
s.logger.Warnf(fmt.Sprintf(`You can find the last couple of lines of Xcode's build log above, but the full log will be also available in the %s
873+
The log file will be stored in $BITRISE_DEPLOY_DIR, and its full path will be available in the $%s environment variable.`, xcodebuildArchiveLogFilename, xcodebuildArchiveLogPathEnvKey))
872874
}
873875
if err != nil {
874876
return out, fmt.Errorf("failed to archive the project: %w", err)
@@ -1019,9 +1021,9 @@ func (s XcodebuildArchiver) xcodeIPAExport(opts xcodeIPAExportOpts) (xcodeIPAExp
10191021
out.XcodebuildExportArchiveLog = xcodebuildLog
10201022
if exportErr != nil {
10211023
if useXCPretty {
1022-
s.logger.Warnf(`If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
1023-
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
1024-
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable`)
1024+
s.logger.Warnf(fmt.Sprintf(`If you can't find the reason of the error in the log, please check the %s
1025+
The log file will be stored in $BITRISE_DEPLOY_DIR, and its full path
1026+
will be available in the $%s environment variable`, xcodebuildExportArchiveLogFilename, xcodebuildExportArchiveLogPathEnvKey))
10251027
}
10261028

10271029
// xcdistributionlogs

0 commit comments

Comments
 (0)