automatic version
This commit is contained in:
@@ -7,20 +7,36 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
**To Reproduce**
|
||||
__Please attach a workflow file to make it easier for others to reproduce the error!__
|
||||
|
||||
**Expected behavior**
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Version:**
|
||||
- ComfyUI Version
|
||||
**Error in console:**
|
||||
If applicable, add the error message from the console.
|
||||
|
||||
**Additional context**
|
||||
**Versions:**
|
||||
Copy the output of the console (4 parts), like this:
|
||||
```
|
||||
** Platform: Windows
|
||||
** Python version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
|
||||
```
|
||||
```
|
||||
Total VRAM 12287 MB, total RAM 130996 MB
|
||||
Set vram state to: NORMAL_VRAM
|
||||
Device: cuda:0 NVIDIA GeForce RTX 3080 Ti : cudaMallocAsync
|
||||
```
|
||||
```
|
||||
### Loading: ComfyUI-Manager (V1.25.3)
|
||||
### ComfyUI Revision: 1886 [6a10640f] | Released on '2024-01-08'
|
||||
```
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
python .others/version.py
|
||||
|
||||
git add __init__.py
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,33 @@
|
||||
import os
|
||||
|
||||
print("-- Setting up the version --")
|
||||
|
||||
versionLabel = "@version:"
|
||||
version_file = os.path.join(os.path.dirname(__file__), "../version")
|
||||
|
||||
with open(version_file, "r") as f:
|
||||
version = f.read().strip()
|
||||
|
||||
if version is None or version == "":
|
||||
raise RuntimeError(f"File without version: {version_file}")
|
||||
|
||||
print(f"Version to set: {version}")
|
||||
|
||||
# modify the __init__.py file with @version
|
||||
file1 = os.path.join(os.path.dirname(__file__), "../__init__.py")
|
||||
print(f"> File1: {file1}")
|
||||
|
||||
file1VersionFound = False
|
||||
# lines = None
|
||||
with open(file1, "r") as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
if versionLabel in line:
|
||||
file1VersionFound = True
|
||||
lines[lines.index(line)] = f"{versionLabel} {version}\n"
|
||||
|
||||
if not file1VersionFound:
|
||||
raise RuntimeError(f"Version label not found in file: {file1}")
|
||||
|
||||
with open(file1, "w") as f2:
|
||||
f2.writelines(lines)
|
||||
@@ -33,6 +33,9 @@ If you want to see the metadata, you can use the "[Crystools](https://github.com
|
||||
|
||||
* I used a specific field in metadata/json: "workflow.extra." I've created an "info" property to store this information. I don't know, and I haven't found any documentation about this, so I hope it's not a problem.
|
||||
|
||||
## Changelog
|
||||
|
||||
Because it is the same project for me, I will use the same changelog on that project [ComfyUI-Crystools](https://github.com/crystian/ComfyUI-Crystools?tab=readme-ov-file#changelog).
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
+12
-12
@@ -1,12 +1,12 @@
|
||||
"""
|
||||
@author: Crystian
|
||||
@title: Crystools-save
|
||||
@nickname: Crystools-save
|
||||
@version: 1.0.0
|
||||
@project: "https://github.com/crystian/ComfyUI-Crystools-save",
|
||||
@description: With this quality of life extension, you can save your workflow with a specific name and include additional details such as the author, a description, and the version (in metadata/json) IG: https://www.instagram.com/crystian.ia
|
||||
"""
|
||||
|
||||
WEB_DIRECTORY = "web"
|
||||
NODE_CLASS_MAPPINGS = {}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {}
|
||||
"""
|
||||
@author: Crystian
|
||||
@title: Crystools-save
|
||||
@nickname: Crystools-save
|
||||
@version: 1.1.0
|
||||
@project: "https://github.com/crystian/ComfyUI-Crystools-save",
|
||||
@description: With this quality of life extension, you can save your workflow with a specific name and include additional details such as the author, a description, and the version (in metadata/json) IG: https://www.instagram.com/crystian.ia
|
||||
"""
|
||||
|
||||
WEB_DIRECTORY = "web"
|
||||
NODE_CLASS_MAPPINGS = {}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {}
|
||||
|
||||
Reference in New Issue
Block a user