Permalink
Browse files

Fixes for appveyor

  • Loading branch information...
pfrazee committed Oct 30, 2017
1 parent a06a7c6 commit ca64eb3e269a34b569768d91fe56187386575979
Showing with 14 additions and 3 deletions.
  1. +2 −1 appveyor.yml
  2. +3 −0 package.json
  3. +9 −2 tasks/postbuild.js
View
@@ -22,4 +22,5 @@ build_script:
test: off
artifacts:
- path: 'dist\*'
- path: 'dist\*.exe'
- path: 'dist\latest.yml'
View
@@ -50,6 +50,9 @@
},
"mac": {
"category": "public.app-category.productivity"
},
"publish": {
"provider": "github"
}
},
"scripts": {
View
@@ -3,13 +3,20 @@ const jetpack = require('fs-jetpack')
const run = require('./util-run')
gulp.task('postbuild', async () => {
// OSX - for some reason, electron-builder is spitting out 'Beaker Browser-{version}{ext}'
// for some reason, electron-builder is spitting out 'Beaker Browser-{version}{ext}'
// but the auto updater expects 'beaker-browser-{version}{ext}'
// so auto-rename any files like that
// couldnt figure out how to reconfig the builder, so just rename the output assets
const cwd = jetpack.cwd('dist')
const names = await cwd.listAsync()
await Promise.all(names.map(name => {
// windows assets:
if (name.startsWith('Beaker Browser Setup') && name.endsWith('.exe')) {
const newName = 'beaker-browser-setup-' + name.slice('Beaker Browser Setup '.length)
return cwd.move(name, newName)
}
// osx assets:
if (name.startsWith('Beaker Browser') && (name.endsWith('.dmg') || name.endsWith('-mac.zip'))) {
const newName = 'beaker-browser' + name.slice('Beaker Browser'.length)
return cwd.move(name, newName)

0 comments on commit ca64eb3

Please sign in to comment.