From d5f4bc9aad62b1c523e9a07386fc6d24514ae917 Mon Sep 17 00:00:00 2001 From: pir8bay Date: Mon, 10 Jun 2024 03:02:03 +0300 Subject: [PATCH] fix --- .github/workflows/preview.yaml | 8 ++++---- src/components/AppHeader/AccountMenu.jsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 6997bfd4..c4b1ebc4 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -48,12 +48,12 @@ jobs: console.info("Pull request number is", pullRequestNumber) return pullRequestNumber - - name: Inject Git Commit Hash - run: sed -i "s/REACT_APP_GIT_COMMIT_HASH/${{ steps.commit_hash.outputs.commit_hash }}/g" ./src/components/AppHeader/AccountMenu.jsx - - name: Set React Environment Variable run: echo "REACT_APP_GIT_COMMIT_HASH=${{ steps.commit_hash.outputs.commit_hash }}" >> $GITHUB_ENV -fix + + - name: Inject Git Commit Hash + run: sed -i "s/REACT_APP_GIT_COMMIT_HASH/${{ steps.commit_hash.outputs.commit_hash }}/g" ./dist/src/components/AppHeader/AccountMenu.jsx + - name: Deploy to Cloudflare Pages id: cloudflare-publish uses: cloudflare/pages-action@v1.5.0 diff --git a/src/components/AppHeader/AccountMenu.jsx b/src/components/AppHeader/AccountMenu.jsx index c76d3a13..7b666216 100644 --- a/src/components/AppHeader/AccountMenu.jsx +++ b/src/components/AppHeader/AccountMenu.jsx @@ -25,7 +25,7 @@ const AccountMenu = ({ profile, open, anchorEl, onClose, ...rest }) => { const shortenGitHash = fullHash => fullHash ? fullHash.substring(0, 7) : ''; // Read the commit hash from the environment variable set during the build process - const gitCommitHash = process.env.REACT_APP_GIT_COMMIT_HASH_PLACEHOLDER || ''; + const gitCommitHash = process.env.REACT_APP_GIT_COMMIT_HASH || ''; const shortGitCommitHash = shortenGitHash(gitCommitHash); const gitCommitUrl = gitCommitHash ? `https://github.com/commaai/openpilot/commit/${gitCommitHash}` : ''; console.log(gitCommitHash)