Skip to content

Commit

Permalink
successful signing!
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jan 4, 2024
1 parent 6785626 commit c3aa38a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions packages/build/src/run-draft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,29 +107,25 @@ export async function runDraft(
// tmpDir
// );

const file = path.join(tmpDir, 'file.txt');
const downloadedArtifact = path.join(tmpDir, 'file.txt');

writeFileSync(file, 'hello, world');
writeFileSync(downloadedArtifact, 'hello, world');

let signatureFile: string | undefined;
try {
require('debug').enable('signing-utils');
await sign(file, {
await sign(downloadedArtifact, {
client: 'local',
signingMethod: 'gpg',
});
console.error({ message: 'completed sign() successfully.' });
signatureFile = file + '.sig';
console.error({ contentsOfTmpdir: await fs.readdir(tmpDir) });
signatureFile = downloadedArtifact + '.sig';
await fs.access(signatureFile, fsConstants.R_OK);

console.error({ message: `successfully signed ${signatureFile}` });
} catch (err: any) {
console.error({ error: err });
console
.warn
// `Skipping expected signature file for ${downloadedArtifact}: ${err.message}`
();
console.warn(
`Skipping expected signature file for ${downloadedArtifact}: ${err.message}`
);
signatureFile = undefined;
}

Expand Down

0 comments on commit c3aa38a

Please sign in to comment.