Skip to content

Commit

Permalink
fix: Do not trash old build artifacts
Browse files Browse the repository at this point in the history
Closes #586
  • Loading branch information
develar committed Aug 12, 2016
1 parent fcecbf0 commit 361b369
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/targets/squirrelPack.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from "path"
import { Promise as BluebirdPromise } from "bluebird"
import { emptyDir, copy, createWriteStream, unlink } from "fs-extra-p"
import { remove, copy, createWriteStream, unlink, ensureDir } from "fs-extra-p"
import { spawn, exec } from "../util/util"
import { debug } from "../util/util"
import { WinPackager } from "../winPackager"
Expand Down Expand Up @@ -54,7 +54,8 @@ export async function buildInstaller(options: SquirrelOptions, outputDirectory:
const promises = [
copy(path.join(options.vendorPath, "Update.exe"), appUpdate)
.then(() => packager.sign(appUpdate)),
emptyDir(outputDirectory)
remove(outputDirectory.replace(/\\/g, "/") + "/*-full.nupkg")
.then(() => ensureDir(outputDirectory))
]
if (options.remoteReleases) {
promises.push(syncReleases(outputDirectory, options))
Expand Down Expand Up @@ -104,10 +105,10 @@ export async function buildInstaller(options: SquirrelOptions, outputDirectory:

async function pack(options: SquirrelOptions, directory: string, updateFile: string, outFile: string, version: string, packageCompressionLevel?: number) {
const archive = archiver("zip", {zlib: {level: packageCompressionLevel == null ? 9 : packageCompressionLevel}})
// const archiveOut = createWriteStream('/Users/develar/test.zip')
const archiveOut = createWriteStream(outFile)
const archivePromise = new BluebirdPromise(function (resolve, reject) {
archive.on("error", reject)
archiveOut.on("error", reject)
archiveOut.on("close", resolve)
})
archive.pipe(archiveOut)
Expand Down
1 change: 0 additions & 1 deletion src/winPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export class WinPackager extends PlatformPackager<WinBuildOptions> {
"--set-version-string", "ProductName", appInfo.productName,
"--set-version-string", "InternalName", appInfo.productName,
"--set-version-string", "LegalCopyright", appInfo.copyright,
// cannot remove OriginalFilename, must be set to some value
"--set-version-string", "OriginalFilename", "",
"--set-file-version", appInfo.buildVersion,
"--set-product-version", appInfo.version,
Expand Down
4 changes: 2 additions & 2 deletions src/windowsCodeSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { getBinFromBintray } from "./util/binDownload"
//noinspection JSUnusedLocalSymbols
const __awaiter = require("./util/awaiter")

const TOOLS_VERSION = "1.4.0"
const TOOLS_VERSION = "1.4.1"

export function getSignVendorPath() {
return getBinFromBintray("winCodeSign", TOOLS_VERSION, "0496cf9d3c68cf00c3873a20794361c782d355c566f0b31a69422571deffeb69")
return getBinFromBintray("winCodeSign", TOOLS_VERSION, "bcafcb1aa9be7544ca9bdffda277e4dcf840f14964e51ed270f83fb850cf2e9e")
}

export interface SignOptions {
Expand Down

0 comments on commit 361b369

Please sign in to comment.