You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
2.8 KiB
44 lines
2.8 KiB
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.PublisherBase = void 0;
|
|
class Publisher {
|
|
/**
|
|
* @param config - A configuration object for this publisher
|
|
* @param platformsToPublishOn - If you want this maker to run on platforms different from `defaultPlatforms` you can provide those platforms here
|
|
*/
|
|
constructor(config, platformsToPublishOn) {
|
|
this.config = config;
|
|
this.platformsToPublishOn = platformsToPublishOn;
|
|
this.config = config;
|
|
Object.defineProperty(this, '__isElectronForgePublisher', {
|
|
value: true,
|
|
enumerable: false,
|
|
configurable: false,
|
|
});
|
|
}
|
|
get platforms() {
|
|
if (this.platformsToPublishOn)
|
|
return this.platformsToPublishOn;
|
|
if (this.defaultPlatforms)
|
|
return this.defaultPlatforms;
|
|
return ['win32', 'linux', 'darwin', 'mas'];
|
|
}
|
|
/**
|
|
* Publishers must implement this method to publish the artifacts returned from
|
|
* make calls. If any errors occur you must throw them, failing silently or simply
|
|
* logging will not propagate issues up to forge.
|
|
*
|
|
* Please note for a given version publish will be called multiple times, once
|
|
* for each set of "platform" and "arch". This means if you are publishing
|
|
* darwin and win32 artifacts to somewhere like GitHub on the first publish call
|
|
* you will have to create the version on GitHub and the second call will just
|
|
* be appending files to the existing version.
|
|
*/
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
async publish(opts) {
|
|
throw new Error(`Publisher ${this.name} did not implement the publish method`);
|
|
}
|
|
}
|
|
exports.default = Publisher;
|
|
exports.PublisherBase = Publisher;
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHVibGlzaGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1B1Ymxpc2hlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF5QkEsTUFBOEIsU0FBUztJQVFyQzs7O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