Skip to content
This repository was archived by the owner on Oct 21, 2020. It is now read-only.

Commit 8d070a5

Browse files
committed
Use a binary for Ubuntu 12.04 provided by Travis
travis-ci/travis-ci#3225
1 parent 155b5c0 commit 8d070a5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

install.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,8 @@ function copyIntoPlace(extractedPath, targetPath) {
351351

352352
function getDownloadUrl() {
353353
var defaultCdnUrl = 'https://bitbucket.org/ariya/phantomjs/downloads'
354-
var eugene1gCdnUrl = 'https://github.com/bprodoehl/phantomjs/releases/download/v2.0.0-20150528/'
354+
var eugene1gCdnUrl = 'https://github.com/bprodoehl/phantomjs/releases/download/v2.0.0-20150528'
355+
var travisUrl = 'https://s3.amazonaws.com/travis-phantomjs'
355356

356357
var versionSuffix = ''
357358
if (process.platform === 'linux' && process.arch === 'x64') {
@@ -363,6 +364,13 @@ function getDownloadUrl() {
363364
versionSuffix = 'windows.zip'
364365
}
365366

367+
// support Travis (runs Ubuntu 12.04)
368+
// @see https://github.com/travis-ci/travis-ci/issues/3225
369+
if (process.env.TRAVIS) {
370+
versionSuffix = 'ubuntu-12.04.tar.bz2'
371+
defaultCdnUrl = travisUrl;
372+
}
373+
366374
if (!versionSuffix) {
367375
console.error('There is no prebuilt binary for your platform:', process.platform, process.arch, os.release())
368376
console.error('You should install phantomjs from source, put the binary on your PATH, and try again')

0 commit comments

Comments
 (0)