File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
tools/src/lib/build-cache Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @rnef/tools ' : patch
3+ ' @rnef/cli ' : patch
4+ ---
5+
6+ fix: remote-cache in json mode
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ async function remoteCache({
5151 traits : args . traits ,
5252 root : projectRoot ,
5353 fingerprintOptions,
54+ raw : isJsonOutput ,
5455 } ) ) ;
5556
5657 switch ( action ) {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import path from 'node:path';
33import { color } from '../color.js' ;
44import type { FingerprintSources } from '../fingerprint/index.js' ;
55import { nativeFingerprint } from '../fingerprint/index.js' ;
6+ import { isInteractive } from '../isInteractive.js' ;
67import { getCacheRootPath } from '../project.js' ;
78import { spinner } from '../prompts.js' ;
89
@@ -95,15 +96,26 @@ export async function formatArtifactName({
9596 traits,
9697 root,
9798 fingerprintOptions,
99+ raw,
98100} : {
99101 platform ?: 'ios' | 'android' ;
100102 traits ?: string [ ] ;
101103 root : string ;
102104 fingerprintOptions : FingerprintSources ;
105+ raw ?: boolean ;
103106} ) : Promise < string > {
104107 if ( ! platform || ! traits ) {
105108 return '' ;
106109 }
110+
111+ if ( raw || ! isInteractive ( ) ) {
112+ const { hash } = await nativeFingerprint ( root , {
113+ ...fingerprintOptions ,
114+ platform,
115+ } ) ;
116+ return `rnef-${ platform } -${ traits . join ( '-' ) } -${ hash } ` ;
117+ }
118+
107119 const loader = spinner ( ) ;
108120 loader . start ( 'Calculating project fingerprint' ) ;
109121 const { hash } = await nativeFingerprint ( root , {
You can’t perform that action at this time.
0 commit comments