From 4546b1ca7c5dfdd6f6432d9340f1f5744922226d Mon Sep 17 00:00:00 2001 From: develar Date: Tue, 7 Feb 2017 18:41:52 +0100 Subject: [PATCH] fix(deployment): log about uploading if non TTY stream --- README.md | 7 +++++++ packages/electron-builder-publisher/src/publisher.ts | 10 +++++++--- yarn.lock | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7c37bcac6e7..2a33bee82ff 100755 --- a/README.md +++ b/README.md @@ -80,6 +80,13 @@ For an app that will be shipped to production, you should sign your application. See the [Auto Update](https://github.com/electron-userland/electron-builder/wiki/Auto-Update) section of the [Wiki](https://github.com/electron-userland/electron-builder/wiki). +## Boilerplates + +* [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) +* [electron-react-redux-boilerplate](https://github.com/jschr/electron-react-redux-boilerplate) +* [electron-boilerplate](https://github.com/szwacz/electron-boilerplate) +* [electron-vue](https://github.com/SimulatedGREG/electron-vue) + ## CLI Usage Execute `node_modules/.bin/build --help` to get the actual CLI usage guide. ``` diff --git a/packages/electron-builder-publisher/src/publisher.ts b/packages/electron-builder-publisher/src/publisher.ts index 5223b8b0279..723258bd247 100644 --- a/packages/electron-builder-publisher/src/publisher.ts +++ b/packages/electron-builder-publisher/src/publisher.ts @@ -6,6 +6,7 @@ import { ProgressCallbackTransform } from "electron-builder-http/out/ProgressCal import { MultiProgress } from "./multiProgress" import { CancellationToken } from "electron-builder-http/out/CancellationToken" import { green } from "chalk" +import { log } from "electron-builder-util/out/log" export type PublishPolicy = "onTag" | "onTagOrDraft" | "always" | "never" @@ -34,8 +35,9 @@ export abstract class Publisher { abstract upload(file: string, artifactName?: string): Promise - protected createProgressBar(fileName: string, fileStat: Stats) { + protected createProgressBar(fileName: string, fileStat: Stats): ProgressBar | null { if (this.context.progress == null) { + log(`Uploading ${fileName} to ${this.providerName}`) return null } else { @@ -71,8 +73,10 @@ export abstract class HttpPublisher extends Publisher { const progressBar = this.createProgressBar(fileName, fileStat) await this.doUpload(fileName, fileStat.size, (request, reject) => { - // reset (because can be called several times (several attempts) - progressBar.update(0) + if (progressBar != null) { + // reset (because can be called several times (several attempts) + progressBar.update(0) + } return this.createReadStreamAndProgressBar(file, fileStat, progressBar, reject).pipe(request) }, file) } diff --git a/yarn.lock b/yarn.lock index 401dfe39f16..4220eeff7bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -65,8 +65,8 @@ acorn-globals@^3.1.0: acorn "^4.0.4" acorn@^4.0.4: - version "4.0.9" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.9.tgz#2d2eb458fe3f0e31062d56cf0b1839c5dc7bd288" + version "4.0.10" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.10.tgz#598ed8bdd4de8b5a7a7fa2f6d2188ebbf9b1f12c" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4"