-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·40 lines (29 loc) · 1.06 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
SHELL := /bin/bash
# Global stuff
DOCKER=docker
SOURCE_PATH := $(shell pwd)
WORKING_PATH=/opt
CONFIG="makefile.json"
UID := $(shell id -u)
# Docker config
DOCKER_RUN=$(DOCKER) run -u $(UID) -v $(SOURCE_PATH):$(WORKING_PATH) -w $(WORKING_PATH)
# Python config
PYTHON_CONTAINER=public.ecr.aws/replicant0wnz/build-python:latest
PYPI_USERNAME=__token__
PYPI_PASSWORD=$(token)
list:
# List options of nothing specified
grep '^[^#[:space:]].*:' Makefile
black:
$(DOCKER_RUN) $(PYTHON_CONTAINER) black src/ses_send/send.py
test:
$(DOCKER_RUN) $(PYTHON_CONTAINER) python -m pytest tests
build:
$(DOCKER_RUN) -e BUILD_VERSION=$(version) $(PYTHON_CONTAINER) python -m build
release_test:
$(DOCKER_RUN) -e TWINE_USERNAME=$(PYPI_USERNAME) -e TWINE_PASSWORD=$(PYPI_PASSWORD) $(PYTHON_CONTAINER) python -m twine upload --verbose --repository testpypi dist/*
release:
$(DOCKER_RUN) -e TWINE_USERNAME=$(PYPI_USERNAME) -e TWINE_PASSWORD=$(PYPI_PASSWORD) $(PYTHON_CONTAINER) python -m twine upload --verbose dist/*
clean:
rm -rf dist .pytest_cache src/*egg-info
all: black test build