diff --git a/.env.template b/.env.template index 28fd2337..3fc83cb0 100644 --- a/.env.template +++ b/.env.template @@ -3,6 +3,7 @@ GOOGLE_GTM_ID=#{GOOGLE_GTM_ID} GOOGLE_ANALYTICS=#{GOOGLE_ANALYTICS} YOUTUBE_API_KEY=#{YOUTUBE_API_KEY} VERSION_DEPLOYED=#{VERSION_DEPLOYED} +COMMIT_HASH=#{COMMIT_HASH} CHINA_BUILD=FALSE WEBSITE_API=#{WEBSITE_API} CRM_APP_ID=#{CRM_APP_ID} diff --git a/.github/workflows/template-build.yml b/.github/workflows/template-build.yml index c2ea1577..5c780623 100644 --- a/.github/workflows/template-build.yml +++ b/.github/workflows/template-build.yml @@ -44,6 +44,7 @@ jobs: APPLICATIONINSIGHTS_CONNECTION_STRING: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING }} CHINA_BUILD: FALSE VERSION_DEPLOYED: ${{ github.run_number }} + COMMIT_HASH: ${{ github.sha }} - name: Rename env file run: | diff --git a/src/components/footer/footer.js b/src/components/footer/footer.js index 08187e27..5a4c9fd4 100644 --- a/src/components/footer/footer.js +++ b/src/components/footer/footer.js @@ -15,6 +15,11 @@ import { import China from '../../images/china.png'; const buildTimestamp = preval`module.exports = new Date().getTime();`; +const commitHash = process.env.COMMIT_HASH; +const lastUpdatedTooltip = `Last updated ${moment(buildTimestamp) + .utc() + .format('D MMM YYYY [at] HH:mm UTC')}`; +const deploymentTooltipId = 'deployment-tooltip'; const Footer = () => { return ( @@ -149,13 +154,42 @@ const Footer = () => {