26 lines
688 B
Makefile
26 lines
688 B
Makefile
PYTHON ?= .venv/bin/python
|
|
PIP ?= .venv/bin/pip
|
|
SERVICE ?= importarr.service
|
|
IMPORTARR_PREFIX ?= /opt/importarr
|
|
IMPORTARR_REPO_DIR ?= $(CURDIR)
|
|
IMPORTARR_URL ?= http://127.0.0.1:8765
|
|
|
|
.PHONY: test install-systemd install-from-repo repo-upgrade verify
|
|
|
|
test:
|
|
$(PYTHON) -m pytest
|
|
|
|
install-systemd:
|
|
sudo -n sh deploy/systemd-install.sh
|
|
|
|
install-from-repo:
|
|
sudo -n $(IMPORTARR_PREFIX)/venv/bin/pip install --upgrade $(IMPORTARR_REPO_DIR)
|
|
|
|
repo-upgrade:
|
|
sudo -n IMPORTARR_PREFIX=$(IMPORTARR_PREFIX) IMPORTARR_REPO_DIR=$(IMPORTARR_REPO_DIR) sh deploy/repo-upgrade.sh
|
|
|
|
verify:
|
|
curl -fsS $(IMPORTARR_URL)/health
|
|
curl -fsS $(IMPORTARR_URL)/api/status
|
|
curl -fsS $(IMPORTARR_URL)/api/preview
|