Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wide-roses-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rock': patch
---

move fingerprint debugging logs behind debug flag
29 changes: 18 additions & 11 deletions packages/cli/src/lib/plugins/fingerprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
type NativeFingerprintCommandOptions = {
platform: 'ios' | 'android';
raw?: boolean;
debug?: boolean;
};

export async function nativeFingerprintCommand(
Expand All @@ -34,17 +35,19 @@ export async function nativeFingerprintCommand(
env,
});
console.log(fingerprint.hash);
// log sources to stderr to avoid polluting the standard output
console.error(
JSON.stringify(
{
hash: fingerprint.hash,
sources: fingerprint.inputs.filter((source) => source.hash != null),
},
null,
2,
),
);
if (options.debug) {
// log sources to stderr to avoid polluting the standard output
console.error(
JSON.stringify(
{
hash: fingerprint.hash,
sources: fingerprint.inputs.filter((source) => source.hash != null),
},
null,
2,
),
);
}
return;
}

Expand Down Expand Up @@ -110,6 +113,10 @@ export const fingerprintPlugin = () => (api: PluginApi) => {
name: '--raw',
description: 'Output the raw fingerprint hash for piping',
},
{
name: '--debug',
description: 'Output additional debugging information',
},
],
args: [
{ name: '[path]', description: 'Directory to calculate fingerprint for' },
Expand Down
Loading