From e95407e6f5bd043162fa695fdd4cebc6d304586c Mon Sep 17 00:00:00 2001 From: JackEnx <167036558+JackEnx@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:51:22 -0300 Subject: [PATCH] refactor: add URL to end of the env main external resources --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- src/main/services/process-watcher.ts | 3 ++- src/main/vite-env.d.ts | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a94eef96..8776f630 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.RENDERER_VITE_EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAIN_VITE_EXTERNAL_RESOURCES: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES }} + MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES_URL }} - name: Build Windows if: matrix.os == 'windows-latest' @@ -63,7 +63,7 @@ jobs: RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.RENDERER_VITE_EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAIN_VITE_EXTERNAL_RESOURCES: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES }} + MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES_URL }} - name: Create artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e8396d71..2f1d3188 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.RENDERER_VITE_EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAIN_VITE_EXTERNAL_RESOURCES: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES }} + MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES_URL }} - name: Build Windows if: matrix.os == 'windows-latest' run: yarn build:win @@ -61,7 +61,7 @@ jobs: RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} RENDERER_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.RENDERER_VITE_EXTERNAL_RESOURCES_URL }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAIN_VITE_EXTERNAL_RESOURCES: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES }} + MAIN_VITE_EXTERNAL_RESOURCES_URL: ${{ vars.MAIN_VITE_EXTERNAL_RESOURCES_URL }} - name: Create artifact uses: actions/upload-artifact@v4 with: diff --git a/src/main/services/process-watcher.ts b/src/main/services/process-watcher.ts index 19b3bc85..fcb0197e 100644 --- a/src/main/services/process-watcher.ts +++ b/src/main/services/process-watcher.ts @@ -34,7 +34,8 @@ let currentTick = 1; const gameExecutables = ( await axios .get( - import.meta.env.MAIN_VITE_EXTERNAL_RESOURCES + "/game-executables.json" + import.meta.env.MAIN_VITE_EXTERNAL_RESOURCES_URL + + "/game-executables.json" ) .catch(() => { return { data: {} }; diff --git a/src/main/vite-env.d.ts b/src/main/vite-env.d.ts index 95e1e545..af40cf5f 100644 --- a/src/main/vite-env.d.ts +++ b/src/main/vite-env.d.ts @@ -6,7 +6,7 @@ interface ImportMetaEnv { readonly MAIN_VITE_ANALYTICS_API_URL: string; readonly MAIN_VITE_AUTH_URL: string; readonly MAIN_VITE_CHECKOUT_URL: string; - readonly MAIN_VITE_EXTERNAL_RESOURCES: string; + readonly MAIN_VITE_EXTERNAL_RESOURCES_URL: string; } interface ImportMeta {