File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/cli/src/command-helpers Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ import { createGunzip } from 'node:zlib';
8
8
import decompress from 'decompress' ;
9
9
import fetch from '../fetch.js' ;
10
10
11
+ // Add GitHub repository configuration via environment variables with defaults
12
+ const GRAPH_NODE_GITHUB_OWNER = process . env . GRAPH_NODE_GITHUB_OWNER || 'graphprotocol' ;
13
+ const GRAPH_NODE_GITHUB_REPO = process . env . GRAPH_NODE_GITHUB_REPO || 'graph-node' ;
14
+
11
15
function getPlatformBinaryName ( ) : string {
12
16
const platform = os . platform ( ) ;
13
17
const arch = os . arch ( ) ;
@@ -43,7 +47,7 @@ async function getLatestGithubRelease(owner: string, repo: string) {
43
47
}
44
48
45
49
export async function getLatestGraphNodeRelease ( ) : Promise < string > {
46
- return getLatestGithubRelease ( 'graphprotocol' , 'graph-node' ) ;
50
+ return getLatestGithubRelease ( GRAPH_NODE_GITHUB_OWNER , GRAPH_NODE_GITHUB_REPO ) ;
47
51
}
48
52
49
53
export async function downloadGraphNodeRelease (
@@ -55,8 +59,8 @@ export async function downloadGraphNodeRelease(
55
59
56
60
try {
57
61
return await downloadGithubRelease (
58
- 'graphprotocol' ,
59
- 'graph-node' ,
62
+ GRAPH_NODE_GITHUB_OWNER ,
63
+ GRAPH_NODE_GITHUB_REPO ,
60
64
release ,
61
65
outputDir ,
62
66
fileName ,
You can’t perform that action at this time.
0 commit comments