Rename version.py to comfyui_version.py

This commit is contained in:
huchenlei 2025-01-10 10:34:38 -05:00
parent 6c16e0f852
commit 84cafe556f
3 changed files with 7 additions and 7 deletions

View File

@ -29,9 +29,9 @@ jobs:
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
- name: Update version.py - name: Update comfyui_version.py
run: | run: |
# Read version from pyproject.toml and update version.py # Read version from pyproject.toml and update comfyui_version.py
python -c ' python -c '
import tomllib import tomllib
@ -40,8 +40,8 @@ jobs:
config = tomllib.load(f) config = tomllib.load(f)
version = config["project"]["version"] version = config["project"]["version"]
# Write version to version.py # Write version to comfyui_version.py
with open("version.py", "w") as f: with open("comfyui_version.py", "w") as f:
f.write("# This file is automatically generated by the build process when version is\n") f.write("# This file is automatically generated by the build process when version is\n")
f.write("# updated in pyproject.toml.\n") f.write("# updated in pyproject.toml.\n")
f.write(f"__version__ = \"{version}\"\n") f.write(f"__version__ = \"{version}\"\n")
@ -53,6 +53,6 @@ jobs:
git config --local user.email "github-actions@github.com" git config --local user.email "github-actions@github.com"
git fetch origin ${{ github.head_ref }} git fetch origin ${{ github.head_ref }}
git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }} git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }}
git add version.py git add comfyui_version.py
git diff --quiet && git diff --staged --quiet || git commit -m "chore: Update version.py to match pyproject.toml" git diff --quiet && git diff --staged --quiet || git commit -m "chore: Update comfyui_version.py to match pyproject.toml"
git push origin HEAD:${{ github.head_ref }} git push origin HEAD:${{ github.head_ref }}

View File

@ -27,7 +27,7 @@ from comfy.cli_args import args
import comfy.utils import comfy.utils
import comfy.model_management import comfy.model_management
import node_helpers import node_helpers
from version import __version__ from comfyui_version import __version__
from app.frontend_management import FrontendManager from app.frontend_management import FrontendManager
from app.user_manager import UserManager from app.user_manager import UserManager
from app.model_manager import ModelFileManager from app.model_manager import ModelFileManager