Skip to content

Commit e678c29

Browse files
danielrozenbergjoshuarrrr
authored andcommitted
Unrevert "🏗 Update @percy/percy-puppeteer to v1.x (ampproject#25176)" (ampproject#25221)
* Revert "Revert "🏗 Update @percy/percy-puppeteer to v1.x (ampproject#25176)" (ampproject#25213)" This reverts commit d134d30. * Do not expect a build when running with --empty
1 parent a0a7d2a commit e678c29

File tree

8 files changed

+1155
-1222
lines changed

8 files changed

+1155
-1222
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ test/coverage
2121
*.swp
2222
*.swo
2323
yarn-error.log
24-
PERCY_BUILD_ID
25-
chromedriver.log
2624
sc-*-linux*
2725
sc-*-osx*
2826
sauce_connect_*

build-system/common/exec.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
const childProcess = require('child_process');
2323

24-
const shellCmd = process.platform == 'win32' ? 'cmd' : '/bin/sh';
25-
const shellFlag = process.platform == 'win32' ? '/C' : '-c';
24+
const shellCmd = process.platform == 'win32' ? 'cmd' : '/bin/bash';
2625

2726
/**
2827
* Spawns the given command in a child process with the given options.
@@ -32,7 +31,7 @@ const shellFlag = process.platform == 'win32' ? '/C' : '-c';
3231
* @return {!Object}
3332
*/
3433
function spawnProcess(cmd, options) {
35-
return childProcess.spawnSync(shellCmd, [shellFlag, cmd], options);
34+
return childProcess.spawnSync(cmd, Object.assign({shell: shellCmd}, options));
3635
}
3736

3837
/**
@@ -56,7 +55,7 @@ function exec(cmd, options) {
5655
* @return {!Object}
5756
*/
5857
function execScriptAsync(script, options) {
59-
return childProcess.spawn(shellCmd, [shellFlag, script], options);
58+
return childProcess.spawn(script, Object.assign({shell: shellCmd}, options));
6059
}
6160

6261
/**

build-system/tasks/visual-diff/helpers.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616
'use strict';
1717

18+
const argv = require('minimist')(process.argv.slice(2));
1819
const colors = require('ansi-colors');
1920
const fancyLog = require('fancy-log');
2021
const sleep = require('sleep-promise');
21-
const {isTravisBuild} = require('../../common/travis');
2222

2323
const CSS_SELECTOR_RETRY_MS = 200;
2424
const CSS_SELECTOR_RETRY_ATTEMPTS = 50;
@@ -54,10 +54,9 @@ function escapeHtml(html) {
5454
function log(mode, ...messages) {
5555
switch (mode) {
5656
case 'verbose':
57-
if (isTravisBuild()) {
58-
return;
57+
if (argv.verbose) {
58+
fancyLog.info(colors.green('VERBOSE:'), ...messages);
5959
}
60-
fancyLog.info(colors.green('VERBOSE:'), ...messages);
6160
break;
6261
case 'info':
6362
fancyLog.info(colors.green('INFO:'), ...messages);
@@ -72,11 +71,6 @@ function log(mode, ...messages) {
7271
process.exitCode = 1;
7372
fancyLog.error(colors.red('FATAL:'), ...messages);
7473
throw new Error(messages.join(' '));
75-
case 'travis':
76-
if (isTravisBuild()) {
77-
messages.forEach(message => process.stdout.write(message));
78-
}
79-
break;
8074
}
8175
}
8276

0 commit comments

Comments
 (0)