Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected output variable and filename of raw output log #313

Merged
merged 4 commits into from Dec 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 10 additions & 8 deletions step/step.go
Expand Up @@ -50,6 +50,8 @@ const (
xcodebuildArchiveLogPathEnvKey = "BITRISE_XCODEBUILD_ARCHIVE_LOG_PATH"
xcodebuildExportArchiveLogPathEnvKey = "BITRISE_XCODEBUILD_EXPORT_ARCHIVE_LOG_PATH"
bitriseIDEDistributionLogsPthEnvKey = "BITRISE_IDEDISTRIBUTION_LOGS_PATH"
xcodebuildArchiveLogFilename = "xcodebuild-archive.log"
xcodebuildExportArchiveLogFilename = "xcodebuild-export-archive.log"

// Env Outputs
bitriseAppDirPthEnvKey = "BITRISE_APP_DIR_PATH"
Expand Down Expand Up @@ -642,7 +644,7 @@ func (s XcodebuildArchiver) ExportOutput(opts ExportOpts) error {
}

if opts.XcodebuildArchiveLog != "" {
xcodebuildArchiveLogPath := filepath.Join(opts.OutputDir, "xcodebuild-archive.log")
xcodebuildArchiveLogPath := filepath.Join(opts.OutputDir, xcodebuildArchiveLogFilename)
if err := cleanup(xcodebuildArchiveLogPath); err != nil {
return err
}
Expand All @@ -655,13 +657,13 @@ func (s XcodebuildArchiver) ExportOutput(opts ExportOpts) error {
}

if opts.XcodebuildExportArchiveLog != "" {
xcodebuildExportArchiveLogPath := filepath.Join(opts.OutputDir, "xcodebuild-export-archive.log")
xcodebuildExportArchiveLogPath := filepath.Join(opts.OutputDir, xcodebuildExportArchiveLogFilename)
if err := cleanup(xcodebuildExportArchiveLogPath); err != nil {
return err
}

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

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
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.`)
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
The log file will be stored in $BITRISE_DEPLOY_DIR, and its full path will be available in the $%s environment variable.`, xcodebuildArchiveLogFilename, xcodebuildArchiveLogPathEnvKey))
}
if err != nil {
return out, fmt.Errorf("failed to archive the project: %w", err)
Expand Down Expand Up @@ -1019,9 +1021,9 @@ func (s XcodebuildArchiver) xcodeIPAExport(opts xcodeIPAExportOpts) (xcodeIPAExp
out.XcodebuildExportArchiveLog = xcodebuildLog
if exportErr != nil {
if useXCPretty {
s.logger.Warnf(`If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable`)
s.logger.Warnf(fmt.Sprintf(`If you can't find the reason of the error in the log, please check the %s
The log file will be stored in $BITRISE_DEPLOY_DIR, and its full path
will be available in the $%s environment variable`, xcodebuildExportArchiveLogFilename, xcodebuildExportArchiveLogPathEnvKey))
}

// xcdistributionlogs
Expand Down