Skip to content

Commit

Permalink
feat(maker-pkg): allow to override .pkg name (#1785)
Browse files Browse the repository at this point in the history
Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Black-Hole <158blackhole@gmail.com>
  • Loading branch information
3 people committed Nov 14, 2022
1 parent 75462be commit e9b4576
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/maker/pkg/src/Config.ts
@@ -1,4 +1,10 @@
export interface MakerPKGConfig {
/**
* The application name.
*
* Default: `${appName}-${packageJSON.version}-${targetArch}`.
*/
name?: string;
/**
* Name of certificate to use when signing.
*
Expand Down
3 changes: 2 additions & 1 deletion packages/maker/pkg/src/MakerPKG.ts
Expand Up @@ -20,7 +20,8 @@ export default class MakerPKG extends MakerBase<MakerPKGConfig> {
throw new Error(`The pkg maker only supports targeting "mas" and "darwin" builds. You provided "${targetPlatform}".`);
}

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

await this.ensureFile(outPath);

Expand Down

0 comments on commit e9b4576

Please sign in to comment.