feat(maker-pkg): allow to override .pkg name (#1785)
Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Black-Hole <158blackhole@gmail.com>
This commit is contained in:
Родитель
75462be120
Коммит
e9b457667e
|
@ -1,4 +1,10 @@
|
|||
export interface MakerPKGConfig {
|
||||
/**
|
||||
* The application name.
|
||||
*
|
||||
* Default: `${appName}-${packageJSON.version}-${targetArch}`.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Name of certificate to use when signing.
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче