Skip to content

Commit bf55e0a

Browse files
committed
Add --no-show-signature to "git show" commands.
This fixes errors if the user has configured the following in their ~/.gitconfig: [log] showSignature = true
1 parent 3dc41d8 commit bf55e0a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/react-devtools-extensions/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const GITHUB_URL = 'https://github.com/facebook/react';
2020

2121
function getGitCommit() {
2222
try {
23-
return execSync('git show -s --format=%h')
23+
return execSync('git show -s --no-show-signature --format=%h')
2424
.toString()
2525
.trim();
2626
} catch (error) {

scripts/release/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const getBuildInfo = async () => {
7272
const branch = await execRead('git branch | grep \\* | cut -d " " -f2', {
7373
cwd,
7474
});
75-
const commit = await execRead('git show -s --format=%h', {cwd});
75+
const commit = await execRead('git show -s --no-show-signature --format=%h', {cwd});
7676
const checksum = await getChecksumForCurrentRevision(cwd);
7777
const dateString = await getDateStringForCommit(commit);
7878
const version = isExperimental
@@ -106,7 +106,7 @@ const getChecksumForCurrentRevision = async cwd => {
106106

107107
const getDateStringForCommit = async commit => {
108108
let dateString = await execRead(
109-
`git show -s --format=%cd --date=format:%Y%m%d ${commit}`
109+
`git show -s --no-show-signature --format=%cd --date=format:%Y%m%d ${commit}`
110110
);
111111

112112
// On CI environment, this string is wrapped with quotes '...'s

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ const {
1919
// by configuring an environment variable.
2020

2121
const sha = String(
22-
spawnSync('git', ['show', '-s', '--format=%h']).stdout
22+
spawnSync('git', ['show', '-s', '--no-show-signature', '--format=%h']).stdout
2323
).trim();
2424

2525
let dateString = String(
26-
spawnSync('git', ['show', '-s', '--format=%cd', '--date=format:%Y%m%d', sha])
26+
spawnSync('git', ['show', '-s', '--no-show-signature', '--format=%cd', '--date=format:%Y%m%d', sha])
2727
.stdout
2828
).trim();
2929

0 commit comments

Comments
 (0)