mirror of
https://github.com/CompassConnections/Compass.git
synced 2025-12-23 22:18:43 -05:00
Add backend commit message
This commit is contained in:
@@ -27,13 +27,16 @@ SERVICE_NAME="api"
|
||||
GIT_REVISION=$(git rev-parse --short HEAD)
|
||||
GIT_COMMIT_DATE=$(git log -1 --format=%ci)
|
||||
GIT_COMMIT_AUTHOR=$(git log -1 --format='%an')
|
||||
GIT_COMMIT_MESSAGE=$(git log -1 --format='%s')
|
||||
echo "Git commit message: ${GIT_COMMIT_MESSAGE}"
|
||||
|
||||
cat > metadata.json << EOF
|
||||
{
|
||||
"git": {
|
||||
"revision": "${GIT_REVISION}",
|
||||
"commitDate": "${GIT_COMMIT_DATE}",
|
||||
"author": "${GIT_COMMIT_AUTHOR}"
|
||||
"author": "${GIT_COMMIT_AUTHOR}",
|
||||
"message": "${GIT_COMMIT_MESSAGE}"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"git": {
|
||||
"revision": "91f69ed",
|
||||
"commitDate": "2025-12-04 20:51:09+0100",
|
||||
"author": "MartinBraquet"
|
||||
"revision": "704bcb4",
|
||||
"commitDate": "2025-12-15 13:38:09 +0200",
|
||||
"author": "MartinBraquet",
|
||||
"message": "Increase API docs font size on mobile"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@compass/api",
|
||||
"description": "Backend API endpoints",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.14",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"watch:serve": "tsx watch src/serve.ts",
|
||||
|
||||
@@ -87,11 +87,13 @@ const BackendInfo = () => {
|
||||
const gitInfo = info.git || {}
|
||||
const sha = gitInfo.revision
|
||||
const commitDate = gitInfo.commitDate
|
||||
const commitMessage = gitInfo.message
|
||||
const url = `${githubRepo}/commit/${sha}`
|
||||
return <Col>
|
||||
<h3>Backend</h3>
|
||||
<p>API version: {info.version}</p>
|
||||
{sha && <p>API commit SHA: <CustomLink href={url}>{sha}</CustomLink></p>}
|
||||
{commitMessage && <p>API commit message: {commitMessage}</p>}
|
||||
{commitDate && <p>API commit date: {commitDate}</p>}
|
||||
</Col>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user