1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.SnapStorePublisher = void 0;
|
4 | const electron_publish_1 = require("electron-publish");
|
5 | const builder_util_1 = require("builder-util");
|
6 | const path = require("path");
|
7 | class 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 | }
|
34 | exports.SnapStorePublisher = SnapStorePublisher;
|
35 |
|
\ | No newline at end of file |