-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (29 loc) · 871 Bytes
/
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
FILE=config
define \n
endef
CONFIG := $(file <${FILE})
CONFIG_AS_LIST := $(subst ${\n}, ,${CONFIG})
DOMAIN := $(word 1,${CONFIG_AS_LIST})
REPO := $(word 2,${CONFIG_AS_LIST})
get:
@echo "Domain is ${DOMAIN}"
@echo "Repo is ${REPO}"
init:
@read -p "Please enter your domain:" DOMAIN; \
read -p "Please enter your repo:" REPO; \
echo -e "$${DOMAIN}\n$${REPO}" > ${FILE}
build:
pip install --user --upgrade setuptools wheel
python setup.py sdist bdist_wheel
push:
pip install --user --upgrade awscli twine && \
aws codeartifact login --tool twine --domain ${DOMAIN} --repository ${REPO} && \
twine upload --repository codeartifact dist/*
clean:
rm -Rf build dist library_name.egg-info
get_token:
aws codeartifact get-authorization-token --domain ${DOMAIN} --query authorizationToken --output text
setup:
pipenv install --dev
test:
pipenv run pytest