Files
osfv-scripts/osfv_cli/Makefile
Pawel Langowski 4be968566f Change project structure + add RF APIS
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2024-06-11 20:15:14 +02:00

24 lines
790 B
Makefile

SNIPEIT_CONFIG_FILE = $(HOME)/.osfv/snipeit.yml
ZABBIX_CONFIG_FILE = $(HOME)/.osfv/zabbix.yml
VERSION=$(shell grep '^version =' pyproject.toml | awk -F'\"' '{print $$2}')
PACKAGE_NAME=$(shell grep '^name =' pyproject.toml | awk -F'\"' '{print $$2}')
REPO_ROOT = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
build:
poetry build
install: build
pip install --force-reinstall dist/$(PACKAGE_NAME)-$(VERSION)-py3-none-any.whl
test -f $(SNIPEIT_CONFIG_FILE) || install -D -m 644 snipeit.yml $(SNIPEIT_CONFIG_FILE)
test -f $(ZABBIX_CONFIG_FILE) || install -D -m 644 zabbix.yml $(ZABBIX_CONFIG_FILE)
uninstall:
pip uninstall -y $(PACKAGE_NAME)
clean:
rm -rf dist build $(PACKAGE_NAME).egg-info osfv_cli/__pycache__
all: build install
.PHONY: install uninstall build clean