Skip to content

Commit ab7e1e7

Browse files
author
Brian Vaughn
committed
Fixed date-string parsing in build-combined script
1 parent 1ed7579 commit ab7e1e7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

scripts/rollup/build-all-release-channels.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
const fs = require('fs');
66
const fse = require('fs-extra');
7-
const {execSync, spawnSync} = require('child_process');
7+
const {spawnSync} = require('child_process');
88
const path = require('path');
99
const tmp = require('tmp');
1010

@@ -22,10 +22,15 @@ const sha = (
2222
spawnSync('git', ['show', '-s', '--format=%h']).stdout + ''
2323
).trim();
2424

25-
const {stdout} = execSync(
26-
`git show -s --format=%cd --date=format:'%Y%m%d' ${sha}`
27-
);
28-
const dateString = stdout.trim();
25+
const dateString = (
26+
spawnSync('git', [
27+
'show',
28+
'-s',
29+
'--format=%cd',
30+
"--date=format:'%Y%m%d'",
31+
sha,
32+
]).stdout + ''
33+
).trim();
2934

3035
if (process.env.CIRCLE_NODE_TOTAL) {
3136
// In CI, we use multiple concurrent processes. Allocate half the processes to

0 commit comments

Comments
 (0)