Files
swift-hvac-toolbox/justfile

34 lines
1.0 KiB
Makefile

docker_image := "hvac-toolbox"
docker_tag := "latest"
docker_registiry := "registry.digitalocean.com/swift-hvac-toolbox"
[private]
default:
just --list
build-docker platform="linux/arm64":
@docker build --platform {{platform}} -t {{docker_registiry}}/{{docker_image}}:{{docker_tag}} .
run:
#!/usr/bin/env zsh
touch .build/browser-dev-sync
browser-sync start -p localhost:8080 --watch --files '.build/browser-dev-sync' &
watchexec -w Sources -e .swift -r 'swift build --product App && touch .build/browser-dev-sync' &
watchexec -w .build/browser-dev-sync --ignore-nothing -r '.build/debug/App serve --log debug'
run-css:
@pnpm run css-watch
clean:
@rm -rf .build
push-image:
@docker push {{docker_registiry}}/{{docker_image}}:{{docker_tag}}
build-docker-production:
@docker build --platform "linux/amd64" -t {{docker_registiry}}/{{docker_image}}:{{docker_tag}} .
test-docker:
@docker build --tag {{docker_image}}:test --file Dockerfile.dev . \
&& docker run --interactive --rm {{docker_image}}:test swift test