Skip to content

Commit

Permalink
fix: Don't log info about the built extension when signing
Browse files Browse the repository at this point in the history
  • Loading branch information
saintsebastian committed Oct 15, 2016
1 parent 8e4e657 commit 062d62a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/cmd/build.js
Expand Up @@ -37,6 +37,7 @@ export type PackageCreatorParams = {
sourceDir: string,
fileFilter: FileFilter,
artifactsDir: string,
showReadyMessage: boolean
};

export type LocalizedNameParams = {
Expand Down Expand Up @@ -78,7 +79,8 @@ export type PackageCreatorFn =
(params: PackageCreatorParams) => Promise<ExtensionBuildResult>;

async function defaultPackageCreator(
{manifestData, sourceDir, fileFilter, artifactsDir}: PackageCreatorParams
{manifestData, sourceDir, fileFilter, artifactsDir,
showReadyMessage}: PackageCreatorParams
): Promise<ExtensionBuildResult> {
let id;
if (manifestData) {
Expand Down Expand Up @@ -110,7 +112,9 @@ async function defaultPackageCreator(

await streamToPromise(stream);

log.info(`Your web extension is ready: ${extensionPath}`);
if (showReadyMessage) {
log.info(`Your web extension is ready: ${extensionPath}`);
}
return {extensionPath};
}

Expand All @@ -128,6 +132,7 @@ export type BuildCmdOptions = {
fileFilter?: FileFilter,
onSourceChange?: OnSourceChangeFn,
packageCreator?: PackageCreatorFn,
showReadyMessage?: boolean
};

export default async function build(
Expand All @@ -136,13 +141,14 @@ export default async function build(
manifestData, fileFilter = new FileFilter(),
onSourceChange = defaultSourceWatcher,
packageCreator = defaultPackageCreator,
showReadyMessage = true,
}: BuildCmdOptions = {}
): Promise<ExtensionBuildResult> {
const rebuildAsNeeded = asNeeded; // alias for `build --as-needed`
log.info(`Building web extension from ${sourceDir}`);

const createPackage = () => packageCreator({
manifestData, sourceDir, fileFilter, artifactsDir,
manifestData, sourceDir, fileFilter, artifactsDir, showReadyMessage,
});

await prepareArtifactsDir(artifactsDir);
Expand Down
3 changes: 2 additions & 1 deletion src/cmd/sign.js
Expand Up @@ -69,7 +69,8 @@ export default function sign(
}

let [buildResult, idFromSourceDir] = await Promise.all([
build({sourceDir, artifactsDir: tmpDir.path()}, {manifestData}),
build({sourceDir, artifactsDir: tmpDir.path()}, {manifestData,
showReadyMessage: false}),
getIdFromSourceDir(sourceDir),
]);

Expand Down

0 comments on commit 062d62a

Please sign in to comment.