Skip to content

Commit

Permalink
chore: do not set version if set to new
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Feb 14, 2017
1 parent 2e1b21e commit bbc1df6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/src/helpers/setVersions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as path from "path"
import { readdir, readJson, writeJson } from "fs-extra-p"
import BluebirdPromise from "bluebird-lst-c"
import * as semver from "semver"

const printErrorAndExit = require("../../../packages/electron-builder-util/out/promise").printErrorAndExit
const exec = require("../../../packages/electron-builder-util/out/util").exec
Expand Down Expand Up @@ -43,7 +44,7 @@ async function setPackageVersions(packages: Array<string>, packageData: Array<an
const packageJson = packageData[i]
const versionInfo = versions[i]
const latestVersion = versionInfo.next || versionInfo.latest
if (packageJson.version == latestVersion) {
if (packageJson.version == latestVersion || semver.lt(latestVersion, packageJson.version)) {
continue
}

Expand Down

0 comments on commit bbc1df6

Please sign in to comment.