mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-07-17 02:38:26 +01:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
31b373b34a | |||
8665ab431c | |||
1b528a4277 | |||
6210b5de7d | |||
ab32c8032c | |||
43ce8e1b89 | |||
826e91e7e2 | |||
98f7a87005 | |||
bc933c2308 | |||
d5c4d54041 | |||
ba9b4b8bd4 |
@ -1,19 +1,24 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "0.2.8"
|
||||
current_version = "0.2.14"
|
||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||
serialize = ["{major}.{minor}.{patch}"]
|
||||
search = "{current_version}"
|
||||
replace = "{new_version}"
|
||||
regex = false
|
||||
ignore_missing_version = false
|
||||
ignore_missing_files = false
|
||||
tag = true
|
||||
sign_tags = false
|
||||
tag_name = "{new_version}"
|
||||
tag_message = "Bump version: {current_version} → {new_version}"
|
||||
allow_dirty = false
|
||||
commit = true
|
||||
message = "Bump version: {current_version} → {new_version}"
|
||||
tag_name = "{new_version}"
|
||||
tag_message = "Bump version: {current_version} → {new_version}"
|
||||
|
||||
[[tool.bumpversion.files]]
|
||||
filename = ".bumpversion.toml"
|
||||
search = 'current_version = "{current_version}"'
|
||||
replace = 'current_version = "{new_version}"'
|
||||
|
||||
[[tool.bumpversion.files]]
|
||||
filename = "Dockerfile"
|
||||
search = 'ARG VERSION="{current_version}"'
|
||||
replace = 'ARG VERSION="{new_version}"'
|
||||
moveable_tags = []
|
||||
commit_args = ""
|
||||
setup_hooks = []
|
||||
|
@ -3,9 +3,13 @@ FROM python:3.11-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
# Set version label
|
||||
ARG VERSION="0.2.14"
|
||||
LABEL version=$VERSION
|
||||
|
||||
# Copy project files into the container
|
||||
COPY . /app
|
||||
|
||||
|
||||
# Install dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
@ -51,10 +51,22 @@ def load_config() -> configparser.ConfigParser:
|
||||
def rename_image() -> str | None:
|
||||
"""Renames 'image.png' in the output folder to a timestamped filename if it exists."""
|
||||
old_path = os.path.join(user_config["comfyui"]["output_dir"], "image.png")
|
||||
favourites_file = "./favourites.json"
|
||||
|
||||
if os.path.exists(old_path):
|
||||
new_filename = f"{str(time.time())}.png"
|
||||
new_path = os.path.join(user_config["comfyui"]["output_dir"], new_filename)
|
||||
|
||||
# Check if image.png is a favourite
|
||||
if os.path.exists(favourites_file):
|
||||
with open(favourites_file, 'r') as f:
|
||||
favourites = json.load(f)
|
||||
if "image.png" in favourites:
|
||||
favourites.remove("image.png")
|
||||
favourites.append(new_filename)
|
||||
with open(favourites_file, 'w') as f:
|
||||
json.dump(favourites, f)
|
||||
|
||||
os.rename(old_path, new_path)
|
||||
generate_thumbnail(new_path)
|
||||
print(f"Renamed 'image.png' to '{new_filename}'")
|
||||
|
Loading…
x
Reference in New Issue
Block a user