@@ -16,37 +16,6 @@ const demand = (key: string): string => {
16
16
}
17
17
} ;
18
18
19
- /**
20
- * Indicates that we're running in a github actions workflow.
21
- */
22
- export const IS_GITHUB_ACTIONS = process . env . GITHUB_ACTIONS === "true" ;
23
-
24
- /**
25
- * Throw if the env var `key` is not set, unless we're running in github
26
- * actions. If running in GHA, then allow the variable to be unset and return
27
- * an empty string if so.
28
- *
29
- * This is useful because for some variables, we want an invariant that the
30
- * value is always present. However, we don't necessarily need the value just
31
- * to run code checks, some of which require a build, we don't want to
32
- * expose the secret to GHA unnecessarily, and we don't want to have to.
33
- *
34
- * So, in effect, variables marked with this will be asserted to be present in
35
- * Vercel or in local dev, and will type check as `string`, but will not throw
36
- * when running code checks in GHA.
37
- *
38
- * Note we use `IS_GITHUB_ACTIONS` and not e.g. `process.env.CI` here because
39
- * both Vercel and Github Actions set `process.env.CI`, and we specifically want
40
- * to only allow these variables to be nonpresent only if running a build just
41
- * for running code checks. Any build that will actually serve traffic must
42
- * have these variables set. Github Actions is the only environment that is
43
- * exclusively used for running checks, so semantically this is correct, but
44
- * this would need to be updated if we change infrastructure.
45
- */
46
- const demandExceptGHA = IS_GITHUB_ACTIONS
47
- ? ( key : string ) => process . env [ key ] ?? ""
48
- : demand ;
49
-
50
19
/**
51
20
* Indicates that this server is the live customer-facing production server.
52
21
*/
@@ -62,6 +31,6 @@ const demandInProduction = IS_PRODUCTION_SERVER
62
31
63
32
export const GOOGLE_ANALYTICS_ID = demandInProduction ( "GOOGLE_ANALYTICS_ID" ) ;
64
33
export const AMPLITUDE_API_KEY = demandInProduction ( "AMPLITUDE_API_KEY" ) ;
65
- export const WALLETCONNECT_PROJECT_ID = demandExceptGHA (
34
+ export const WALLETCONNECT_PROJECT_ID = demandInProduction (
66
35
"WALLETCONNECT_PROJECT_ID" ,
67
36
) ;
0 commit comments