@@ -19,6 +19,7 @@ import { t } from './utils/i18n';
19
19
import { tempDir } from './utils/constants' ;
20
20
import { checkLockFiles } from './utils/check-lockfile' ;
21
21
import { addGitIgnore } from './utils/add-gitignore' ;
22
+ import { commands as versionCommands } from './versions' ;
22
23
23
24
type Diff = ( oldSource ?: Buffer , newSource ?: Buffer ) => Buffer ;
24
25
@@ -916,6 +917,9 @@ export const commands = {
916
917
expo,
917
918
rncli,
918
919
disableHermes,
920
+ name,
921
+ description,
922
+ metaInfo,
919
923
} = translateOptions ( {
920
924
...options ,
921
925
tempDir,
@@ -956,14 +960,17 @@ export const commands = {
956
960
957
961
await pack ( path . resolve ( intermediaDir ) , realOutput ) ;
958
962
959
- const v = await question ( t ( 'uploadBundlePrompt' ) ) ;
960
- if ( v . toLowerCase ( ) === 'y' ) {
961
- const versionName = await this . publish ( {
963
+ if ( name ) {
964
+ const versionName = await versionCommands . publish ( {
962
965
args : [ realOutput ] ,
963
966
options : {
964
967
platform,
968
+ name,
969
+ description,
970
+ metaInfo,
965
971
} ,
966
972
} ) ;
973
+
967
974
if ( isSentry ) {
968
975
await copyDebugidForSentry ( bundleName , intermediaDir , sourcemapOutput ) ;
969
976
await uploadSourcemapForSentry (
@@ -973,6 +980,25 @@ export const commands = {
973
980
versionName ,
974
981
) ;
975
982
}
983
+ } else if ( ! options [ 'no-interactive' ] ) {
984
+ const v = await question ( t ( 'uploadBundlePrompt' ) ) ;
985
+ if ( v . toLowerCase ( ) === 'y' ) {
986
+ const versionName = await versionCommands . publish ( {
987
+ args : [ realOutput ] ,
988
+ options : {
989
+ platform,
990
+ } ,
991
+ } ) ;
992
+ if ( isSentry ) {
993
+ await copyDebugidForSentry ( bundleName , intermediaDir , sourcemapOutput ) ;
994
+ await uploadSourcemapForSentry (
995
+ bundleName ,
996
+ intermediaDir ,
997
+ sourcemapOutput ,
998
+ versionName ,
999
+ ) ;
1000
+ }
1001
+ }
976
1002
}
977
1003
} ,
978
1004
0 commit comments