Skip to content

Commit

Permalink
feat(maker-pkg): allow to override .pkg name
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #1784
  • Loading branch information
mahnunchik committed Jun 22, 2020
1 parent deff81a commit f93904b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/maker/pkg/src/Config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// eslint-disable-next-line import/prefer-default-export
export interface MakerPKGConfig {
/**
* The name to the output the flattened package.
*
* Default: `${appName}-${packageJSON.version}.pkg`
*/
name?: string;
/**
* Name of certificate to use when signing.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/maker/pkg/src/MakerPKG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class MakerDMG extends MakerBase<MakerPKGConfig> {
throw new Error(`The pkg maker only supports targetting "mas" and "darwin" builds. You provided "${targetPlatform}"`);
}

const outPath = path.resolve(makeDir, `${appName}-${packageJSON.version}.pkg`);
const outPath = path.resolve(makeDir, this.config.name || `${appName}-${packageJSON.version}.pkg`);

await this.ensureFile(outPath);

Expand Down

0 comments on commit f93904b

Please sign in to comment.