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

Display git hash in startup message for easy version tracking #24

Open
jaspermayone opened this issue May 9, 2024 · 1 comment
Open
Assignees
Labels
good first issue Good for newcomers v1

Comments

@jaspermayone
Copy link
Contributor

No description provided.

@aramshiva
Copy link
Member

aramshiva commented May 9, 2024

We can do this simply by running some bash commands on running. An example can be seen in my websites Next.js configuration files where it runs code like this:

const commitHash = require("child_process")
   .execSync('git log --pretty=format:"%h" -n1')
   .toString()
   .trim();

const fullcommitHash = require("child_process")
   .execSync('git log --pretty=format:"%H" -n1')
   .toString()
   .trim();

We can run a similar code for this to run when the bolt app starts/initates. I'll work on this!

We can also send this as a message if we aren't in production, elsewise lets log this in console.

@aramshiva aramshiva self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers v1
Projects
Status: No status
Development

No branches or pull requests

2 participants