From 079b940d8e06cdcf12b508dd4a5663b87f7d366f Mon Sep 17 00:00:00 2001 From: snowy Date: Sun, 18 Aug 2024 04:18:20 +0800 Subject: [PATCH] =?UTF-8?q?:children=5Fcrossing:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki/version.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/liteyuki/version.py b/liteyuki/version.py index 2d77580f..069cb9c9 100644 --- a/liteyuki/version.py +++ b/liteyuki/version.py @@ -11,13 +11,10 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved from git import Repo from pdm.backend.hooks.version import SCMVersion -try: - __commit__ = Repo(".").head.commit.hexsha -except: - __commit__ = "unknown" +__commit__ = Repo(".").head.commit.hexsha __version__ = "6.3.5" def format_version(version: SCMVersion) -> str: - return f"{__version__}+{__commit__[:7]}" + return f"{__version__}.dev{int(__commit__[:7], 16)}"