Skip to content

Commit

Permalink
chore: fix appveyor.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Apr 2, 2020
1 parent d11c760 commit e909842
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ environment:

install:
- ps: Install-Product node 12 x64
- YARN_CHECKSUM_BEHAVIOR=ignore node .yarn/releases/yarn-sources.js install
- set YARN_CHECKSUM_BEHAVIOR=ignore
- node .yarn/releases/yarn-sources.js install

build: off

test_script:
- node .yarn/releases/yarn-sources.js test
- node .yarn/releases/yarn-sources.js pretest
- node .yarn/releases/yarn-sources.js node ./test/out/helpers/runTests.js
8 changes: 7 additions & 1 deletion packages/electron-updater/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
## 4.3.0

### Bug Fixes

* Remove dependency on pako module, use native API instead.

## 4.2.0

### Bug Fixes

* Forbid using of quotes in a file names. Thanks to [Doyensec](https://doyensec.com/).
* Forbid using of quotes in a file names.

## 4.2.0

Expand Down
24 changes: 14 additions & 10 deletions test/src/helpers/downloadElectron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,29 @@ const executeAppBuilder: (options: any) => Promise<any> = require(path.join(__di
export async function deleteOldElectronVersion(): Promise<any> {
// on CircleCi no need to clean manually
if (process.env.CIRCLECI || !isCi) {
return Promise.resolve()
return
}

const cacheDir = getElectronCacheDir()
return await Promise.all((await fs.readdir(cacheDir)).map(file => {
let files: Array<string>
try {
files = await fs.readdir(cacheDir)
}
catch (e) {
if (e.code === "ENOENT") {
return
}
else {
throw e
}
}
return await Promise.all(files.map(file => {
if (file.endsWith(".zip") && !file.includes(ELECTRON_VERSION)) {
console.log(`Remove old electron ${file}`)
return fs.unlink(path.join(cacheDir, file))
}
return Promise.resolve(null)
}))
.catch(e => {
if (e.code === "ENOENT") {
return []
}
else {
throw e
}
})
}

export function downloadAllRequiredElectronVersions(): Promise<any> {
Expand Down

0 comments on commit e909842

Please sign in to comment.