Skip to content

Commit 668a057

Browse files
committed
rename REACT_APP_WEB_BUILD to REACT_APP_BUILD_TARGET
1 parent 640b895 commit 668a057

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/distribute.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88
types:
99
- created
1010
env:
11-
REACT_APP_ANALYTICS_ID: ${{ secrets.ANALYTICS_ID }}
12-
REACT_APP_WEB_BUILD: 0
11+
REACT_APP_BUILD_TARGET: "extension"
1312
jobs:
1413

1514
bump-manifest-version:

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<link rel="preconnect" href="https://hackertab.dev" />
1010
<script src="./startup.js"></script>
1111

12-
<% if (!!+process.env.REACT_APP_WEB_BUILD) { %>
12+
<% if (process.env.REACT_APP_BUILD_TARGET==='web' ) { %>
1313
<title>Hackertab</title>
1414
<link rel="manifest" href="%PUBLIC_URL%/web_manifest.json" />
1515
<% } else { %>

src/utils/Environment.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export const isDevelopment = (): boolean => {
77
}
88

99
export const isWebOrExtensionVersion = (): string => {
10-
const webBuild = process.env.REACT_APP_WEB_BUILD as string;
11-
12-
return webBuild === "0" ? "web" : "extension"
10+
const buildTarget = process.env.REACT_APP_BUILD_TARGET as "web" | "extension" | undefined;
11+
return buildTarget || "web";
1312
}
1413

1514
export const getBrowserName = (): string => {

0 commit comments

Comments
 (0)