Skip to content

Commit

Permalink
fix(squirrel.windows): use GH_TOKEN
Browse files Browse the repository at this point in the history
Close #714
  • Loading branch information
develar committed Sep 1, 2016
1 parent 3b1ad57 commit e102e3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { all, executeFinally } from "./util/promise"
import { EventEmitter } from "events"
import { Promise as BluebirdPromise } from "bluebird"
import { AppMetadata, DevMetadata, Platform, Arch } from "./metadata"
import { PackagerOptions, PlatformPackager, BuildInfo, ArtifactCreated, Target } from "./platformPackager"
import { PlatformPackager, BuildInfo, ArtifactCreated, Target } from "./platformPackager"
import { WinPackager } from "./winPackager"
import * as errorMessages from "./errorMessages"
import * as util from "util"
Expand All @@ -19,6 +19,7 @@ import MacPackager from "./macPackager"
import { createTargets } from "./targets/targetFactory"
import { readPackageJson } from "./util/readPackageJson"
import { TmpDir } from "./util/tmp"
import { BuildOptions } from "./builder"

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

//noinspection JSUnusedGlobalSymbols
constructor(public options: PackagerOptions) {
constructor(public options: BuildOptions) {
this.projectDir = options.projectDir == null ? process.cwd() : path.resolve(options.projectDir)
}

Expand Down
3 changes: 2 additions & 1 deletion src/platformPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { copyFiltered, devDependencies } from "./util/filter"
import { ElectronPackagerOptions, pack } from "./packager/dirPackager"
import { TmpDir } from "./util/tmp"
import { FileMatchOptions, FileMatcher, FilePattern, deprecatedUserIgnoreFilter } from "./fileMatcher"
import { BuildOptions } from "./builder"

//noinspection JSUnusedLocalSymbols
const __awaiter = require("./util/awaiter")
Expand Down Expand Up @@ -52,7 +53,7 @@ export interface PackagerOptions {
}

export interface BuildInfo {
options: PackagerOptions
options: BuildOptions

devMetadata: DevMetadata

Expand Down
4 changes: 4 additions & 0 deletions src/targets/squirrelWindows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export default class SquirrelWindowsTarget extends Target {
vendorPath: await getBinFromBintray("Squirrel.Windows", SW_VERSION, SW_SHA2)
}, packager.platformSpecificBuildOptions)

if (options.remoteToken == null) {
options.remoteToken = packager.info.options.githubToken
}

if (!("loadingGif" in options)) {
const resourceList = await packager.resourceList
if (resourceList.includes("install-spinner.gif")) {
Expand Down

0 comments on commit e102e3e

Please sign in to comment.