Rewrite publish changelog extraction in plain shell; bump 0.1.2

This commit is contained in:
huchukato
2026-09-25 00:28:59 +02:00
parent 5040f55063
commit 104d632273
3 changed files with 21 additions and 21 deletions
+16 -20
View File
@@ -15,26 +15,22 @@ jobs:
uses: actions/checkout@v4
- name: Extract changelog
run: |
python3 - <<'PY'
import pathlib, re, subprocess, tomllib
version = tomllib.loads(pathlib.Path("pyproject.toml").read_text())["project"]["version"]
section = ""
for fname in ("update.md", "UPDATE.md", "CHANGELOG.md"):
p = pathlib.Path(fname)
if not p.exists():
continue
text = p.read_text(encoding="utf-8")
m = re.search(
rf"^##\s+[^\n]*?{re.escape(version)}(?![\d.])[^\n]*\n(.*?)(?=^##\s|\Z)",
text, re.M | re.S,
)
if m and m.group(1).strip():
section = m.group(1).strip()
break
if not section:
section = subprocess.check_output(["git", "log", "-1", "--pretty=%B"]).decode().strip()
pathlib.Path("changelog.txt").write_text(section[:4000] or f"v{version}\n", encoding="utf-8")
PY
VERSION=$(sed -n 's/^version = "\([^"]*\)"/\1/p' pyproject.toml | head -1)
ESCAPED=$(printf '%s' "$VERSION" | sed 's/\./\\./g')
for f in update.md UPDATE.md CHANGELOG.md; do
[ -f "$f" ] || continue
awk -v ver="$ESCAPED" '
/^## / {
if (found) exit
if ($0 ~ ("(^|[^0-9.])" ver "([^0-9.]|$)")) { found = 1 }
next
}
found { print }
' "$f" > changelog.txt
[ -s changelog.txt ] && break
done
[ -s changelog.txt ] || git log -1 --pretty=%B > changelog.txt
head -c 4000 changelog.txt > changelog.tmp && mv changelog.tmp changelog.txt
- name: Publish Custom Node
run: |
pip install comfy-cli
+4
View File
@@ -1,5 +1,9 @@
# Update Log
## Version 0.1.2
- Publish workflow: changelog extraction rewritten in plain shell — the embedded Python (`pathlib`/`subprocess`) in the previous workflow was flagged by the registry security scanner (`python_sensitive_file_access`), blocking 0.1.1.
## Version 0.1.1
- Added `use_image_aspect` toggle: when disabled, the manual `aspect_ratio` and `resolution` widgets are respected even with images connected — useful for reference-image workflows (e.g. MiniMax R2VA) where inputs are character sheets, not frame sources. Default stays `True`, so existing workflows keep auto-detecting aspect from the input image.
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "ComfyUI-PerfectVideoResolution"
description = "Perfect Video Resolution node for ComfyUI — automatically calculates and applies the optimal resolution for video generation models (WAN 2.2, MiniMax H3, LTX) based on aspect ratio and model requirements."
version = "0.1.1"
version = "0.1.2"
license = {file = "LICENSE"}
dependencies = []