Add --no-show-signature to "git show" commands (#23038)
* Add --no-show-signature to "git show" commands. This fixes errors if the user has configured the following in their ~/.gitconfig: [log] showSignature = true * yarn prettier-all
Stefan Sundin committed
Jan 11, 2022 at 09:14 UTC
9a7e6bf0d0cf08114b74c9fe45c06e60a5e496e4
3 files changed
+14
-6
packages/react-devtools-extensions/utils.js
+1
-1
@@ -20,7 +20,7 @@ const GITHUB_URL = 'https://github.com/facebook/react';
20
21
function getGitCommit() {
22
try {
23
- return execSync('git show -s --format=%h')
23
+ return execSync('git show -s --no-show-signature --format=%h')
24
.toString()
25
.trim();
26
} catch (error) {
scripts/release/utils.js
+4
-2
@@ -72,7 +72,9 @@ const getBuildInfo = async () => {
72
const branch = await execRead('git branch | grep \\* | cut -d " " -f2', {
73
cwd,
74
});
75
- const commit = await execRead('git show -s --format=%h', {cwd});
75
+ const commit = await execRead('git show -s --no-show-signature --format=%h', {
76
+ cwd,
77
+ });
78
const checksum = await getChecksumForCurrentRevision(cwd);
79
const dateString = await getDateStringForCommit(commit);
80
const version = isExperimental
@@ -106,7 +108,7 @@ const getChecksumForCurrentRevision = async cwd => {
108
109
const getDateStringForCommit = async commit => {
110
let dateString = await execRead(
109
- `git show -s --format=%cd --date=format:%Y%m%d ${commit}`
111
+ `git show -s --no-show-signature --format=%cd --date=format:%Y%m%d ${commit}`
112
);
113
114
// On CI environment, this string is wrapped with quotes '...'s
scripts/rollup/build-all-release-channels.js
+9
-3
@@ -19,12 +19,18 @@ const {
19
// by configuring an environment variable.
20
21
const sha = String(
22
- spawnSync('git', ['show', '-s', '--format=%h']).stdout
22
+ spawnSync('git', ['show', '-s', '--no-show-signature', '--format=%h']).stdout
23
).trim();
24
25
let dateString = String(
26
- spawnSync('git', ['show', '-s', '--format=%cd', '--date=format:%Y%m%d', sha])
27
- .stdout
26
+ spawnSync('git', [
27
+ 'show',
28
+ '-s',
29
+ '--no-show-signature',
30
+ '--format=%cd',
31
+ '--date=format:%Y%m%d',
32
+ sha,
33
+ ]).stdout
34
).trim();
35
36
// On CI environment, this string is wrapped with quotes '...'s