Skip to content

Commit

Permalink
Merge pull request #832 from NeonGamerBot-QK/feat/commit-hash
Browse files Browse the repository at this point in the history
feat: commit hash
  • Loading branch information
maxwofford authored Nov 29, 2024
2 parents b1d5d30 + 379fae2 commit 0f089cd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/** @type {import('next').NextConfig} */

import { withPlausibleProxy } from 'next-plausible'
import { execSync } from 'child_process'
const commitHash = execSync('git log --pretty=format:"%h" -n1')
.toString()
.trim()

const nextConfig = {
typescript: {
Expand All @@ -10,6 +14,9 @@ const nextConfig = {
// !! WARN !!
ignoreBuildErrors: true,
},
env: {
COMMIT_HASH: commitHash,
},
images: {
remotePatterns: [
{ protocol: 'https', hostname: 'avatars.slack-edge.com' },
Expand Down
12 changes: 10 additions & 2 deletions src/app/marketing/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,6 @@ export default async function Marketing() {
>
Hack Club
</Link>
.
</p>
<p className="max-w-2xl text-pink-800 text-sm">
Hack Club is a 501(c)(3) nonprofit and network of 30k+ technical
Expand Down Expand Up @@ -871,7 +870,16 @@ export default async function Marketing() {
>
{"ran Canada's largest high school hackathon"}
</Link>
.
. This server is currently on{' '}
<Link
href={`https://github.com/hackclub/high-seas/commit/${process.env.COMMIT_HASH}`}
target="_blank"
rel="noopenner noreferrer"
className="footLink"
>
{process.env.COMMIT_HASH?.slice(0, 6)}
</Link>{' '}
commit.
</p>
</div>

Expand Down

0 comments on commit 0f089cd

Please sign in to comment.