Skip to content

Commit b30372a

Browse files
author
Brian Vaughn
committed
Tweaking build-all-release-channels script again
1 parent eeddd56 commit b30372a

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

packages/shared/ReactVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default '18.0.0-ab7e1e724-20210622';
1+
export default '18.0.0-eeddd56e6-20210623';

scripts/release/utils.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,16 @@ const getChecksumForCurrentRevision = async cwd => {
105105
};
106106

107107
const getDateStringForCommit = async commit => {
108-
return await execRead(
108+
let dateString = await execRead(
109109
`git show -s --format=%cd --date=format:%Y%m%d ${commit}`
110110
);
111+
112+
// On CI environment, this string is wrapped with quotes '...'s
113+
if (dateString.startsWith("'")) {
114+
dateString = dateString.substr(1, 8);
115+
}
116+
117+
return dateString;
111118
};
112119

113120
const getCommitFromCurrentBuild = async () => {

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ const sha = (
2222
spawnSync('git', ['show', '-s', '--format=%h']).stdout + ''
2323
).trim();
2424

25-
const dateString = (
25+
let dateString = (
2626
spawnSync('git', ['show', '-s', '--format=%cd', '--date=format:%Y%m%d', sha])
2727
.stdout + ''
2828
).trim();
2929

30+
// On CI environment, this string is wrapped with quotes '...'s
31+
if (dateString.startsWith("'")) {
32+
dateString = dateString.substr(1, 8);
33+
}
34+
3035
if (process.env.CIRCLE_NODE_TOTAL) {
3136
// In CI, we use multiple concurrent processes. Allocate half the processes to
3237
// build the stable channel, and the other half for experimental. Override

0 commit comments

Comments
 (0)