@@ -19,6 +19,7 @@ import { t } from './utils/i18n';
1919import { tempDir } from './utils/constants' ;
2020import { checkLockFiles } from './utils/check-lockfile' ;
2121import { addGitIgnore } from './utils/add-gitignore' ;
22+ import { commands as versionCommands } from './versions' ;
2223
2324type Diff = ( oldSource ?: Buffer , newSource ?: Buffer ) => Buffer ;
2425
@@ -916,6 +917,9 @@ export const commands = {
916917 expo,
917918 rncli,
918919 disableHermes,
920+ name,
921+ description,
922+ metaInfo,
919923 } = translateOptions ( {
920924 ...options ,
921925 tempDir,
@@ -956,14 +960,17 @@ export const commands = {
956960
957961 await pack ( path . resolve ( intermediaDir ) , realOutput ) ;
958962
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 ( {
962965 args : [ realOutput ] ,
963966 options : {
964967 platform,
968+ name,
969+ description,
970+ metaInfo,
965971 } ,
966972 } ) ;
973+
967974 if ( isSentry ) {
968975 await copyDebugidForSentry ( bundleName , intermediaDir , sourcemapOutput ) ;
969976 await uploadSourcemapForSentry (
@@ -973,6 +980,25 @@ export const commands = {
973980 versionName ,
974981 ) ;
975982 }
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+ }
9761002 }
9771003 } ,
9781004
0 commit comments