Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display git commit version #556

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kittybest
Copy link
Contributor

@kittybest kittybest commented Dec 16, 2024

Description

  • Read commit version before start, dev, and build, and write to the .env file.
  • display on the organizer board & footer

Related Issues
close #551

Discussion

  1. Is there any easier way to accomplish this?
  2. should the commit be displayed to everyone during the development mode? or only the organizer?
  3. where to put it?

@kittybest kittybest self-assigned this Dec 16, 2024
Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maci-platform ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 5:31pm

packages/interface/package.json Outdated Show resolved Hide resolved
"lint": "next lint",
"lint:fix": "next lint --fix",
"start": "next start",
"start": "pnpm run git-hash && next start",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if just exporting before running works the same, so instead of using a separate script, it's just:

EXPORT NEXT_PUBLIC_COMMIT_HASH=`git log --pretty=format:"%h" -n` && next start

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried before and there's some problem (so actually this command won't be successfully run).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Feat(interface): show commit version to the deployed website
2 participants