Skip to content

Commit e102e3e

Browse files
committed
fix(squirrel.windows): use GH_TOKEN
Close #714
1 parent 3b1ad57 commit e102e3e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/packager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { all, executeFinally } from "./util/promise"
77
import { EventEmitter } from "events"
88
import { Promise as BluebirdPromise } from "bluebird"
99
import { AppMetadata, DevMetadata, Platform, Arch } from "./metadata"
10-
import { PackagerOptions, PlatformPackager, BuildInfo, ArtifactCreated, Target } from "./platformPackager"
10+
import { PlatformPackager, BuildInfo, ArtifactCreated, Target } from "./platformPackager"
1111
import { WinPackager } from "./winPackager"
1212
import * as errorMessages from "./errorMessages"
1313
import * as util from "util"
@@ -19,6 +19,7 @@ import MacPackager from "./macPackager"
1919
import { createTargets } from "./targets/targetFactory"
2020
import { readPackageJson } from "./util/readPackageJson"
2121
import { TmpDir } from "./util/tmp"
22+
import { BuildOptions } from "./builder"
2223

2324
//noinspection JSUnusedLocalSymbols
2425
const __awaiter = require("./util/awaiter")
@@ -45,7 +46,7 @@ export class Packager implements BuildInfo {
4546
readonly tempDirManager = new TmpDir()
4647

4748
//noinspection JSUnusedGlobalSymbols
48-
constructor(public options: PackagerOptions) {
49+
constructor(public options: BuildOptions) {
4950
this.projectDir = options.projectDir == null ? process.cwd() : path.resolve(options.projectDir)
5051
}
5152

src/platformPackager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { copyFiltered, devDependencies } from "./util/filter"
1515
import { ElectronPackagerOptions, pack } from "./packager/dirPackager"
1616
import { TmpDir } from "./util/tmp"
1717
import { FileMatchOptions, FileMatcher, FilePattern, deprecatedUserIgnoreFilter } from "./fileMatcher"
18+
import { BuildOptions } from "./builder"
1819

1920
//noinspection JSUnusedLocalSymbols
2021
const __awaiter = require("./util/awaiter")
@@ -52,7 +53,7 @@ export interface PackagerOptions {
5253
}
5354

5455
export interface BuildInfo {
55-
options: PackagerOptions
56+
options: BuildOptions
5657

5758
devMetadata: DevMetadata
5859

src/targets/squirrelWindows.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ export default class SquirrelWindowsTarget extends Target {
7777
vendorPath: await getBinFromBintray("Squirrel.Windows", SW_VERSION, SW_SHA2)
7878
}, packager.platformSpecificBuildOptions)
7979

80+
if (options.remoteToken == null) {
81+
options.remoteToken = packager.info.options.githubToken
82+
}
83+
8084
if (!("loadingGif" in options)) {
8185
const resourceList = await packager.resourceList
8286
if (resourceList.includes("install-spinner.gif")) {

0 commit comments

Comments
 (0)