Skip to content

Commit d692121

Browse files
committed
Fix: add versioning or latest commit information to our about page
1 parent b848690 commit d692121

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
with:
2929
node-version: 18
3030
cache: 'npm'
31+
- name: Get Commit Hash
32+
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
33+
- name: Generate Version File
34+
run: echo "export const COMMIT_HASH = '${{ env.COMMIT_HASH }}';" > src/version.js
3135
- name: Run install
3236
run: npm ci
3337
- name: Build Storybook

src/pages/about/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import './About.scss'
66
import { useQuery } from '@tanstack/react-query'
77
import SlackIcon from '../../resources/slack-icon.svg'
88
import Widget from 'src/shared/Widget'
9+
import { COMMIT_HASH } from '../../version';
910

1011
const pageName = 'aboutPage'
1112
const About = () => {
@@ -164,9 +165,12 @@ const Attributions = () => {
164165
<h2>Attributions</h2>
165166
<ul>
166167
<li>
167-
Thanks <a href="http://www.applitools.com/">Applitools</a> for the free open-source
168+
Thanks <a href="http://www.applitools.com/">Applitools</a> for the free open-source.
168169
license for their visual testing tool
169170
</li>
171+
<p>
172+
Version commit hash: <strong>{COMMIT_HASH}</strong>
173+
</p>
170174
<li>
171175
Bus ifmage by{' '}
172176
<a

src/version.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const COMMIT_HASH = 'test1234';

0 commit comments

Comments
 (0)