forked from bigbrozer/comfyture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
98 lines (84 loc) · 2.62 KB
/
Copy pathTaskfile.yml
File metadata and controls
98 lines (84 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: '3'
silent: true
vars:
PYTHON_VERSION:
sh: "cat .python-version"
tasks:
bump:
desc: "Bump versions and update the changelog"
cmds:
- scripts/bump.sh
clean:
desc: "Clean everything"
deps: ["clean:tests", "clean:docker"]
clean:docker:
desc: "Cleanup docker builder and image"
cmds:
- docker builder prune -a -f
- docker image prune -a -f
clean:tests:
desc: "Cleanup test artifacts"
cmds:
- docker compose -f compose.yaml -f compose.dev.yaml down -v
build:
desc: "Build the docker image"
dotenv: ["metadata.env"]
cmds:
- docker buildx bake build --set "*.tags=${COMFYTURE_IMAGE}:latest"
lock:
desc: "Lock requirements"
dotenv: ["metadata.env"]
cmds:
- echo "Installing python..."
- uv python install {{.PYTHON_VERSION}}
- echo "Compiling requirements..."
- |
uv pip compile \
--python {{.PYTHON_VERSION}} \
--index-strategy "unsafe-best-match" \
--format "pylock.toml" \
--output-file "pylock.toml" requirements.in
preview-changelog:
desc: "Preview next changelog"
cmds:
- git cliff --bump --unreleased
tag:
desc: "Create a new tag for this release"
prompt: "You are about to create a new release. Continue ?"
cmds:
- scripts/tag.sh
- echo "Now, push commit with tags (git push origin --tags) to create the release."
update:
desc: "Update everything to latest versions"
vars:
LATEST_TAG:
sh: "curl -s https://api.github.com/repos/Comfy-Org/ComfyUI/releases/latest | jq -r '.tag_name' | sed 's/^v//'"
cmds:
- task: update:comfyui
vars:
LATEST_TAG: "{{.LATEST_TAG}}"
- task: lock
- echo "Done! ComfyUI updated to v{{.LATEST_TAG}}."
- git add metadata.env pylock.toml
- |
git commit -m "feat(comfy): bump to v{{.LATEST_TAG}}
* <https://github.com/Comfy-Org/ComfyUI/releases/tag/v{{.LATEST_TAG}}>"
- echo "Done! ComfyUI updated to v{{.LATEST_TAG}}."
update:comfyui:
desc: "Update ComfyUI to latest stable release"
dotenv: ["metadata.env"]
requires:
vars:
- LATEST_TAG
preconditions:
- sh: "[ '{{.LATEST_TAG}}' != '${COMFYUI_VERSION}' ]"
msg: "Already up-to-date (v${COMFYUI_VERSION})."
cmds:
- echo "Updating ComfyUI from v${COMFYUI_VERSION} to v{{.LATEST_TAG}}..."
- sed -i 's/^COMFYUI_VERSION=.*/COMFYUI_VERSION={{.LATEST_TAG}}/' metadata.env
tests:
desc: "Test to run comfyture locally"
deps:
- build
cmds:
- docker compose -f compose.yaml -f compose.dev.yaml up