Skip to content

Commit 791ba44

Browse files
authored
Artifact name defaults to scheme if PRODUCT_NAME is empty (#260)
* Artifact name defaults to scheme if PRODUCT_NAME is empty * Regenerate README
1 parent aa4fda9 commit 791ba44

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ You can also run this step directly with [Bitrise CLI](https://github.com/bitris
7575
| `export_options_plist_content` | Specifies a plist file content that configures archive exporting. If not specified, the Step will auto-generate it. | | |
7676
| `output_dir` | | required | `$BITRISE_DEPLOY_DIR` |
7777
| `export_all_dsyms` | | required | `yes` |
78-
| `artifact_name` | This name will be used as basename for the generated Xcode Archive, App, IPA and dSYM files. If not specified, the Product Name (`PRODUCT_NAME`) Build settings value will be used. | | |
78+
| `artifact_name` | This name will be used as basename for the generated Xcode Archive, App, IPA and dSYM files. If not specified, the Product Name (`PRODUCT_NAME`) Build settings value will be used. If Product Name is not specified, the Scheme will be used. | | |
7979
| `cache_level` | Defines what cache content should be automatically collected. Available options: - `none`: Disable collecting cache content - `swift_packages`: Collect Swift PM packages added to the Xcode project | required | `swift_packages` |
8080
| `verbose_log` | | required | `no` |
8181
</details>

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (s XcodeArchiveStep) ProcessInputs() (Config, error) {
288288
return Config{}, fmt.Errorf("failed to read build settings: %w", err)
289289
}
290290
productName, err := settings.String("PRODUCT_NAME")
291-
if err != nil {
291+
if err != nil || productName == "" {
292292
logger.Warnf("Product name not found in build settings, using scheme (%s) as artifact name", config.Scheme)
293293
productName = config.Scheme
294294
}

step.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ inputs:
240240
This name will be used as basename for the generated Xcode Archive, App, IPA and dSYM files.
241241
242242
If not specified, the Product Name (`PRODUCT_NAME`) Build settings value will be used.
243+
If Product Name is not specified, the Scheme will be used.
243244
244245
# Caching
245246

0 commit comments

Comments
 (0)