Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sarem-h committed Jun 10, 2024
1 parent f9debdf commit d5f4bc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppHeader/AccountMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d5f4bc9

Please sign in to comment.