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"] vars: LOCK_FORMAT: "pylock.toml" cmds: - echo "Installing python..." - uv python install {{.PYTHON_VERSION}} - echo "Compiling requirements..." - | uv pip compile \ --python {{.PYTHON_VERSION}} \ --index-strategy "unsafe-best-match" \ --format "{{.LOCK_FORMAT}}" \ --output-file "{{.LOCK_FORMAT}}" requirements.in preview-changelog: desc: "Preview next changelog" cmds: - git cliff --unreleased --tag "$(scripts/next-version.sh)" 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:check: desc: "Check if ComfyUI is up-to-date" dotenv: ["metadata.env"] vars: LATEST_TAG: sh: "curl -s https://api.github.com/repos/Comfy-Org/ComfyUI/releases/latest | jq -r '.tag_name' | sed 's/^v//'" preconditions: - sh: '[ "{{.LATEST_TAG}}" != "${COMFYUI_VERSION}" ]' msg: "Already up-to-date (v{{.LATEST_TAG}})." cmds: - 'echo "Update available! Current version: v${COMFYUI_VERSION}, Latest version: v{{.LATEST_TAG}}."' 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}} * " - 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{{.LATEST_TAG}})." 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