forked from administration/panel
fix: show commit hash and branch instead of v0.0.1
parent
3f5ec1f2ef
commit
84d594ad0b
|
@ -1,7 +1,25 @@
|
|||
import { execSync } from "child_process";
|
||||
|
||||
export default function Sparkle() {
|
||||
const hash = execSync("git rev-parse HEAD", { cwd: process.cwd() }).toString().trim();
|
||||
const branch = execSync("git rev-parse --abbrev-ref HEAD", { cwd: process.cwd() }).toString().trim();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-xl text-center">Running version v0.0.1</h1>
|
||||
<h1 className="text-xl text-center">
|
||||
<span>Running version </span>
|
||||
<code>
|
||||
<a href={`https://git.revolt.chat/administration/panel/commit/${hash}`} target="_blank">
|
||||
{hash.substring(0, 10)}
|
||||
</a>
|
||||
</code>
|
||||
<span> on branch </span>
|
||||
<code>
|
||||
<a href={`https://git.revolt.chat/administration/panel/src/branch/${branch}`} target="_blank">
|
||||
{branch}
|
||||
</a>
|
||||
</code>
|
||||
</h1>
|
||||
<img
|
||||
className="absolute right-0 bottom-0"
|
||||
src="https://api.gifbox.me/file/posts/MF3oORlDjfHAVJ-DgPyRQSjMdy9WNIxk.webp"
|
||||
|
|
Loading…
Reference in New Issue