Skip to content

Commit

Permalink
Update simple-git and add support for GIT_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
rthic23 committed Jul 26, 2024
1 parent 5880526 commit 24891b4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ern-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"react-native-cli": "^2.0.1",
"semver": "^7.3.5",
"shelljs": "^0.8.4",
"simple-git": "^2.38.1",
"simple-git": "^3.25.0",
"tmp": "^0.2.1",
"treeify": "^1.1.0",
"tunnel": "^0.0.6",
Expand Down
13 changes: 11 additions & 2 deletions ern-core/src/gitCli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import simpleGit = require('simple-git/promise');
const simpleGit = require('simple-git');

export function gitCli(workingDir?: string) {
return simpleGit(workingDir);
const sGit = simpleGit.simpleGit(workingDir);

if (process.env.ERN_GITHUB_TOKEN) {
sGit.addConfig(
'http.extraheader',
`Authorization: Basic ${process.env.ERN_GITHUB_TOKEN}`,
);
}

return sGit;
}
17 changes: 12 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2562,6 +2562,13 @@ debug@^3.1.0:
dependencies:
ms "^2.1.1"

debug@^4.3.5:
version "4.3.5"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e"
integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==
dependencies:
ms "2.1.2"

debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
Expand Down Expand Up @@ -6470,14 +6477,14 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.6.tgz#24e630c4b0f03fea446a2bd299e62b4a6ca8d0af"
integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==

simple-git@^2.38.1:
version "2.48.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-2.48.0.tgz#87c262dba8f84d7b96bb3a713e9e34701c1f6e3b"
integrity sha512-z4qtrRuaAFJS4PUd0g+xy7aN4y+RvEt/QTJpR184lhJguBA1S/LsVlvE/CM95RsYMOFJG3NGGDjqFCzKU19S/A==
simple-git@^3.25.0:
version "3.25.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-3.25.0.tgz#3666e76d6831f0583dc380645945b97e0ac4aab6"
integrity sha512-KIY5sBnzc4yEcJXW7Tdv4viEz8KyG+nU0hay+DWZasvdFOYKeUZ6Xc25LUHHjw0tinPT7O1eY6pzX7pRT1K8rw==
dependencies:
"@kwsites/file-exists" "^1.1.1"
"@kwsites/promise-deferred" "^1.1.1"
debug "^4.3.2"
debug "^4.3.5"

simple-plist@^0.2.1:
version "0.2.1"
Expand Down

0 comments on commit 24891b4

Please sign in to comment.