Skip to content

Commit

Permalink
build: add cfa support (electron#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhashimotoo authored Aug 20, 2020
1 parent ba88c0e commit 0599592
Show file tree
Hide file tree
Showing 8 changed files with 8,492 additions and 14,357 deletions.
40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2

jobs:
test:
docker:
- image: circleci/node:12
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
- run: yarn --frozen-lockfile
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- run: yarn test

release:
docker:
- image: circleci/node:12
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
- run: yarn --frozen-lockfile
- run: npx semantic-release

workflows:
version: 2
test_and_release:
# release when tests are successful
jobs:
- test
- release:
requires:
- test
filters:
branches:
only:
- master
8 changes: 8 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@continuous-auth/semantic-release-npm",
"@semantic-release/github"
]
}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const gh = require('github-url-to-object')
const path = require('path')
const fs = require('fs')
const os = require('os')
const {format} = require('util')
const { format } = require('util')
const pkg = require('./package.json')
const userAgent = format(
'%s/%s (%s: %s)',
Expand Down Expand Up @@ -34,10 +34,10 @@ module.exports = function updater (opts = {}) {
}

function initUpdater (opts) {
const {host, repo, updateInterval, logger, electron} = opts
const {app, autoUpdater, dialog} = electron
const { host, repo, updateInterval, logger, electron } = opts
const { app, autoUpdater, dialog } = electron
const feedURL = `${host}/${repo}/${process.platform}-${process.arch}/${app.getVersion()}`
const requestHeaders = {'User-Agent': userAgent}
const requestHeaders = { 'User-Agent': userAgent }

function log (...args) {
logger.log(...args)
Expand Down Expand Up @@ -100,7 +100,7 @@ function validateInput (opts) {
logger: console,
notifyUser: true
}
const {host, updateInterval, logger, notifyUser} = Object.assign({}, defaults, opts)
const { host, updateInterval, logger, notifyUser } = Object.assign({}, defaults, opts)

// allows electron to be mocked in tests
const electron = opts.electron || require('electron')
Expand Down Expand Up @@ -143,5 +143,5 @@ function validateInput (opts) {
'function'
)

return {host, repo, updateInterval, logger, electron, notifyUser}
return { host, repo, updateInterval, logger, electron, notifyUser }
}
Loading

0 comments on commit 0599592

Please sign in to comment.