UNPKG

1.15 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.SnapStorePublisher = void 0;
4const electron_publish_1 = require("electron-publish");
5const builder_util_1 = require("builder-util");
6const path = require("path");
7class SnapStorePublisher extends electron_publish_1.Publisher {
8 constructor(context, options) {
9 super(context);
10 this.options = options;
11 this.providerName = "snapStore";
12 }
13 upload(task) {
14 this.createProgressBar(path.basename(task.file), -1);
15 const args = ["publish-snap", "-f", task.file];
16 let channels = this.options.channels;
17 if (channels == null) {
18 channels = ["edge"];
19 }
20 else {
21 if (typeof channels === "string") {
22 channels = channels.split(",");
23 }
24 }
25 for (const channel of channels) {
26 args.push("-c", channel);
27 }
28 return (0, builder_util_1.executeAppBuilder)(args);
29 }
30 toString() {
31 return "Snap Store";
32 }
33}
34exports.SnapStorePublisher = SnapStorePublisher;
35//# sourceMappingURL=SnapStorePublisher.js.map
\No newline at end of file