From 8214b7807c20bfd4fe08ed57b2998a4d251279d2 Mon Sep 17 00:00:00 2001 From: Minhyeok Park Date: Wed, 13 Nov 2024 15:29:35 +0900 Subject: [PATCH] feat: add version info --- .gitea/workflows/deploy_site.yml | 1 + src/Editor/index.tsx | 6 ++++-- src/Editor/style.module.scss | 4 ++++ src/version.ts | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/version.ts diff --git a/.gitea/workflows/deploy_site.yml b/.gitea/workflows/deploy_site.yml index e8f4553..d1aa916 100644 --- a/.gitea/workflows/deploy_site.yml +++ b/.gitea/workflows/deploy_site.yml @@ -10,6 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: mc alias set minio http://minio-service.minio.svc.cluster.local:9000 ${{ secrets.MINIO_ACCESS_KEY }} ${{ secrets.MINIO_SECRET_KEY }} + - run: echo "export const VERSION = '$(git rev-parse --short HEAD)'" > src/version.ts - run: pnpm i - run: pnpm build - run: mc mirror $PWD/dist/ minio/ptools --overwrite diff --git a/src/Editor/index.tsx b/src/Editor/index.tsx index 998c8ca..f302b41 100644 --- a/src/Editor/index.tsx +++ b/src/Editor/index.tsx @@ -3,6 +3,7 @@ import { Editor as MonacoEditor } from "@monaco-editor/react"; import { useRecoilState } from "recoil"; import { EditorValueState } from "../GlobalStates/EditorValueState"; import { motion } from "framer-motion"; +import { VERSION } from "../version"; import style from "./style.module.scss"; @@ -57,8 +58,9 @@ export const Editor: FC = () => {
-

The PTOOLS v2

-

Made by Minhyeok Park

+

The PTOOLS

+

v2-{VERSION}

+

© Minhyeok Park

diff --git a/src/Editor/style.module.scss b/src/Editor/style.module.scss index 0b338ef..ccce2bd 100644 --- a/src/Editor/style.module.scss +++ b/src/Editor/style.module.scss @@ -14,6 +14,10 @@ opacity: 0.25; pointer-events: none; + b { + font-weight: 900; + } + .suika { width: 140px; } diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 0000000..e2c14d3 --- /dev/null +++ b/src/version.ts @@ -0,0 +1 @@ +export const VERSION = 'deadbeef'