-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (33 loc) · 1.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
SHELL := /bin/bash
DKC := $(shell command -v docker-compose 2> /dev/null || { command -v docker > /dev/null && echo 'docker compose'; })
ifeq ($(DKC),)
$(error Neither docker-compose nor docker compose found)
endif
export USERID ?= $(shell id -u)
export GROUPID ?= $(shell id -g)
.PHONY: up db-refresh sentiment-topic comments down build clean
up: db-refresh
export MODE=run && $(DKC) up -d --remove-orphans streamlit
db-refresh: down build
export MODE=refresh && $(DKC) run --remove-orphans --rm streamlit
sentiment-topic: down build
$(DKC) run --remove-orphans --rm sentiment-topic
comments: down build
$(DKC) run --remove-orphans --rm comments
down:
$(DKC) down
$(DKC) rm -fsv
build:
$(DKC) build
clean:
rm -rf build
rm -rf dist
find . -name '__pycache__' -not -path '*/\.git/*' -exec rm -rf {} \+
find . -name '.pytest_cache' -not -path '*/\.git/*' -exec rm -rf {} \+
find . -name '.mypy_cache' -not -path '*/\.git/*' -exec rm -rf {} \+
find . -name '*.pyc' -not -path '*/\.git/*' -exec rm -f {} \+
find . -name '*.pyo' -not -path '*/\.git/*' -exec rm -f {} \+
find . -name '*.egg-info' -not -path '*/\.git/*' -exec rm -rf {} \+
find . -name '*~' -not -path '*/\.git/*' -exec rm -f {} \+
find . -name tags -not -path '*/\.git/*' -exec rm -f {} \+
find . -name tags.lock -not -path '*/\.git/*' -exec rm -f {} \+