File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
packages/cli/src/lib/plugins Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @rnef/cli ' : patch
3+ ---
4+
5+ fix: upload app.tar.gz with binary-path
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ type Flags = {
2020 json ?: boolean ;
2121 all ?: boolean ;
2222 allButLatest ?: boolean ;
23- binaryPath ?: string
23+ binaryPath ?: string ;
2424} ;
2525
2626async function remoteCache ( {
@@ -121,15 +121,22 @@ async function remoteCache({
121121 }
122122 case 'upload' : {
123123 const localArtifactPath = getLocalArtifactPath ( artifactName ) ;
124- const binaryPath = args . binaryPath ?? getLocalBinaryPath ( localArtifactPath ) ;
124+ const binaryPath =
125+ args . binaryPath ?? getLocalBinaryPath ( localArtifactPath ) ;
125126 if ( ! binaryPath ) {
126127 throw new RnefError ( `No binary found for "${ artifactName } ".` ) ;
127128 }
128129 const zip = new AdmZip ( ) ;
129- const absoluteTarballPath = path . join ( localArtifactPath , 'app.tar.gz' ) ;
130+ const absoluteTarballPath =
131+ args . binaryPath ?? path . join ( localArtifactPath , 'app.tar.gz' ) ;
130132 const isAppDirectory = fs . statSync ( binaryPath ) . isDirectory ( ) ;
131133 if ( isAppDirectory ) {
132134 const appName = path . basename ( binaryPath ) ;
135+ if ( ! fs . existsSync ( absoluteTarballPath ) ) {
136+ throw new RnefError (
137+ `No tarball found for "${ artifactName } " in "${ localArtifactPath } ".`
138+ ) ;
139+ }
133140 await tar . create (
134141 {
135142 file : absoluteTarballPath ,
You can’t perform that action at this time.
0 commit comments