feat: 增加日历与版本化日报
This commit is contained in:
24
scripts/bump_version.py
Normal file
24
scripts/bump_version.py
Normal file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Increment the patch component in the tracked VERSION file."""
|
||||
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(PROJECT_ROOT))
|
||||
|
||||
from snooper_version import bump_patch
|
||||
|
||||
|
||||
def main() -> int:
|
||||
path = PROJECT_ROOT / "VERSION"
|
||||
current = path.read_text(encoding="utf-8").strip()
|
||||
updated = bump_patch(current)
|
||||
path.write_text(updated + "\n", encoding="utf-8")
|
||||
print(f"{current} -> {updated}")
|
||||
print("请将 VERSION 的变更纳入下一次 commit。")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user