Skip to content

Commit 2ffa656

Browse files
author
John Kleinschmidt
authored
Merge pull request #27 from electron/3-0-x
3.0.0-beta.1
2 parents 20ae18c + 1b0b79d commit 2ffa656

File tree

6 files changed

+52
-43
lines changed

6 files changed

+52
-43
lines changed

.circleci/config.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#
55
version: 2
66
jobs:
7-
build:
7+
install-test-linux:
88
docker:
99
# specify the version you desire here
10-
- image: circleci/node:7.10-browsers
10+
- image: circleci/node:9-browsers
1111

1212
# Specify service dependencies here if necessary
1313
# CircleCI maintains a library of pre-built images
@@ -37,3 +37,37 @@ jobs:
3737
- run: node --version
3838
- run: npm --version
3939
- run: npm test
40+
41+
install-test-osx:
42+
macos:
43+
xcode: "9.0"
44+
steps:
45+
- checkout
46+
47+
# Download and cache dependencies
48+
- restore_cache:
49+
keys:
50+
- v1-mac-dependencies-{{ checksum "package.json" }}
51+
# fallback to using the latest cache if no exact match is found
52+
- v1-mac-dependencies-
53+
54+
- run: npm install
55+
56+
- save_cache:
57+
paths:
58+
- node_modules
59+
key: v1-mac-dependencies-{{ checksum "package.json" }}
60+
61+
# run tests!
62+
- run: node --version
63+
- run: npm --version
64+
- run: npm test
65+
66+
workflows:
67+
version: 2
68+
test-linux:
69+
jobs:
70+
- install-test-linux
71+
test-osx:
72+
jobs:
73+
- install-test-osx

Jenkinsfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Electron ChromeDriver
22

3-
[![Linux Build Status](https://circleci.com/gh/electron/chromedriver/tree/master.svg?style=shield)](https://circleci.com/gh/electron/chromedriver/tree/master)
4-
[![Mac Build Status](https://mac-ci.electronjs.org/buildStatus/icon?job=Electron%20org/chromedriver/master)](https://mac-ci.electronjs.org/blue/organizations/jenkins/Electron%20org%2Fchromedriver/activity?branch=master)
3+
[![Linux and Mac Build Status](https://circleci.com/gh/electron/chromedriver/tree/master.svg?style=shield)](https://circleci.com/gh/electron/chromedriver/tree/master)
54
[![Windows Build status](https://ci.appveyor.com/api/projects/status/43safb37jdlaeviw/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/chromedriver/branch/master)
65
<br>
76
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
@@ -14,9 +13,9 @@
1413
Simple node module to download the [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver)
1514
version for [Electron](http://electron.atom.io).
1615

17-
This minor version of this library tracks the minor version of the Electron
18-
versions released. So if you are using Electron `1.0.x` you would want to use
19-
an `electron-chromedriver` dependency of `~1.0.0` in your `package.json` file.
16+
The major version of this library tracks the major version of the Electron
17+
versions released. So if you are using Electron `2.0.x` you would want to use
18+
an `electron-chromedriver` dependency of `~2.0.0` in your `package.json` file.
2019

2120
This library is used by [spectron](https://github.com/electron/spectron).
2221

download-chromedriver.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@ var fs = require('fs')
22
var path = require('path')
33
var electronDownload = require('electron-download')
44
var extractZip = require('extract-zip')
5-
65
var versionToDownload = require('./package').version
76

8-
download(versionToDownload, function (err, zipPath) {
9-
if (err) {
10-
var versionSegments = versionToDownload.split('.')
11-
var baseVersion = versionSegments[0] + '.' + versionSegments[1] + '.0'
12-
download(baseVersion, processDownload)
13-
} else {
14-
processDownload(err, zipPath)
15-
}
16-
})
17-
187
function download (version, callback) {
198
electronDownload({
209
version: version,
@@ -30,11 +19,20 @@ function processDownload (err, zipPath) {
3019
if (err != null) throw err
3120
extractZip(zipPath, {dir: path.join(__dirname, 'bin')}, function (error) {
3221
if (error != null) throw error
33-
console.log('successfully downloaded and extracted!')
3422
if (process.platform !== 'win32') {
3523
fs.chmod(path.join(__dirname, 'bin', 'chromedriver'), '755', function (error) {
3624
if (error != null) throw error
3725
})
3826
}
3927
})
4028
}
29+
30+
download(versionToDownload, function (err, zipPath) {
31+
if (err) {
32+
var versionSegments = versionToDownload.split('.')
33+
var baseVersion = versionSegments[0] + '.' + versionSegments[1] + '.0'
34+
download(baseVersion, processDownload)
35+
} else {
36+
processDownload(err, zipPath)
37+
}
38+
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "electron-chromedriver",
3-
"version": "2.0.0",
3+
"version": "3.0.0-beta.1",
44
"description": "Electron ChromeDriver",
55
"repository": "https://github.com/electron/chromedriver",
66
"bin": {

test/chromedriver-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('chromedriver binary', function () {
2020
chromeDriver.stderr.on('data', function (data) { output += data })
2121

2222
chromeDriver.on('close', function () {
23-
assert.equal(output.indexOf('ChromeDriver 2.30'), 0, 'Unpexected version: ' + output)
23+
assert.equal(output.indexOf('ChromeDriver 2.36'), 0, 'Unpexected version: ' + output)
2424
})
2525

2626
chromeDriver.on('error', done)

0 commit comments

Comments
 (0)