diff --git a/pkg/core/notes/n003_print_version.py b/pkg/core/notes/n003_print_version.py new file mode 100644 index 00000000..6eed21d6 --- /dev/null +++ b/pkg/core/notes/n003_print_version.py @@ -0,0 +1,21 @@ +from __future__ import annotations + +import typing +import os +import sys +import logging + +from .. import note, app + + +@note.note_class("PrintVersion", 3) +class PrintVersion(note.LaunchNote): + """打印版本信息 + """ + + async def need_show(self) -> bool: + return True + + async def yield_note(self) -> typing.AsyncGenerator[typing.Tuple[str, int], None]: + + yield f"当前版本:{self.ap.ver_mgr.get_current_version()}", logging.INFO diff --git a/pkg/core/stages/show_notes.py b/pkg/core/stages/show_notes.py index 91cdbf01..63d8f580 100644 --- a/pkg/core/stages/show_notes.py +++ b/pkg/core/stages/show_notes.py @@ -1,7 +1,7 @@ from __future__ import annotations from .. import stage, app, note -from ..notes import n001_classic_msgs, n002_selection_mode_on_windows +from ..notes import n001_classic_msgs, n002_selection_mode_on_windows, n003_print_version @stage.stage_class("ShowNotesStage") diff --git a/pkg/utils/constants.py b/pkg/utils/constants.py index 0dce973c..5d6ee96d 100644 --- a/pkg/utils/constants.py +++ b/pkg/utils/constants.py @@ -1,4 +1,4 @@ -semantic_version = "v3.4.6" +semantic_version = "v3.4.6.1" debug_mode = False