set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

dev-build-wheel:
    cd backend/civitComfyBindings/; maturin build
    cd backend/test_python_server; uv run main.py

dev-p:
    cd backend/test_python_server; uv run main.py
    
dev-r:
    cd backend/rust_dev_server/; cargo run

dev-frontend:
    cd front-end; npm run dev

publish-list:
    cd backend/target/wheels; ls

release commitMessage version:
    cd backend/civitComfyBindings; cargo set-version {{version}} #needs to install cargo-edit
    just build
    git add --all
    git commit -m "{{commitMessage}}"
    git tag v{{version}}
    git push origin main tag v{{version}}
    
build:
    npm run build
    cd front-end; npm run build
    
publish file token:
    cd front-end; npm run build
    cd backend/civitComfyBindings/; maturin build --release; 
    cd backend/target/wheels; uv publish {{file}} --token {{token}}