run:
	ENV_TYPE="development" Y_PYTHON_SOURCE_ROOT="/home/$(USER)/arc/arcadia" asgi/watcher.asgi asgi.app:app --log-level DEBUG --reload

test:
	ya make -tt --test-disable-timeout

test-pdb:
	ya make -tt --pdb

dbshell:
	Y_PYTHON_ENTRY_POINT="watcher.manage:dbshell" asgi/watcher.asgi $@

shell:
	Y_PYTHON_ENTRY_POINT="IPython:start_ipython" asgi/watcher.asgi

VERSION := $(USER)-$(shell date +"%s")
STAGE := watcher_stand_$(USER)
stand:
	ya tool releaser build --version $(VERSION)
	ya tool releaser push --version $(VERSION)
	ya tool releaser deploy --version $(VERSION) --stage $(STAGE)

testing:
	ya tool releaser release

deploy-migration:
	ya tool releaser deploy -e watcher-prod -c console:console

production:
	ya tool releaser deploy -e watcher-prod
