-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (49 loc) · 1.37 KB
/
Makefile
File metadata and controls
64 lines (49 loc) · 1.37 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
PYTHONPATH=./src/
PYTHON=./venv/bin/python
REPO_NAME=starplot-hyg
VERSION=$(shell ./venv/bin/python -c 'from build import __version__; print(__version__)')
VERSION_CHECK=$(shell gh release list \
-R steveberardi/$(REPO_NAME) \
--limit 1000 \
--json tagName \
--jq '.[] | select(.tagName == "v$(VERSION)")' | wc -c)
# Environment Variables ------------------------------------------
export STARPLOT_DATA_PATH=./data/
# Development ------------------------------------------
install: venv/bin/activate
format: venv/bin/activate
@$(PYTHON) -m ruff format build.py $(ARGS)
@$(PYTHON) -m ruff check build.py --fix $(ARGS)
venv/bin/activate: requirements.txt
python -m venv venv
./venv/bin/pip install -r requirements.txt
shell: venv/bin/activate
$(PYTHON)
clean:
rm -rf __pycache__
rm -rf venv
rm -rf build
build: venv/bin/activate
rm -rf build
rm -f build.log
@mkdir -p build
@mkdir -p data
$(PYTHON) build.py
# Releases ------------------------------------------
release-check:
@CHECK="$(VERSION_CHECK)"; \
if [ $$CHECK -eq 0 ] ; then \
echo "version check passed!"; \
else \
echo "version tag already exists"; \
false; \
fi
release: release-check
gh release create \
v$(VERSION) \
build/*.parquet \
--title "v$(VERSION)" \
-R steveberardi/$(REPO_NAME)
version: venv/bin/activate
@echo $(VERSION)
.PHONY: clean test release release-check build