Skip to content

Commit 9d5c074

Browse files
authored
Merge pull request #234 from bugsnag/je/plat-14965
2 parents a0eb1d8 + 03d4f71 commit 9d5c074

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## unreleased
4+
5+
### Fixed
6+
7+
- Ensure that we handle `CodeBundleId` for the `upload js` command correctly [#234](https://github.com/bugsnag/bugsnag-cli/pull/234)
8+
39
## [3.4.0] - 2025-09-12
410

511
### Added

pkg/utils/upload-options.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ func BuildReactNativeUploadOptions(appVersion string, versionCode string, codeBu
124124
func BuildJsUploadOptions(versionName string, codeBundleId string, bundleUrl string, projectRoot string, overwrite bool) (map[string]string, error) {
125125
uploadOptions := make(map[string]string)
126126

127-
if versionName != "" {
127+
// If codeBundleId is set, use that instead of appVersion
128+
if codeBundleId != "" {
129+
uploadOptions["codeBundleId"] = codeBundleId
130+
} else if versionName != "" {
128131
uploadOptions["appVersion"] = versionName
129132
}
130133

@@ -138,10 +141,6 @@ func BuildJsUploadOptions(versionName string, codeBundleId string, bundleUrl str
138141
uploadOptions["projectRoot"] = projectRoot
139142
}
140143

141-
if codeBundleId != "" {
142-
uploadOptions["codeBundleId"] = codeBundleId
143-
}
144-
145144
if overwrite {
146145
uploadOptions["overwrite"] = "true"
147146
}

0 commit comments

Comments
 (0)