forked from rivethealth/aws-cli-saml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (60 loc) · 1.29 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
###
# Config
###
JOBS ?= $(shell nproc)
MAKEFLAGS += -j $(JOBS) -r
PATH := $(abspath node_modules)/.bin:$(PATH)
.DELETE_ON_ERROR:
.SECONDARY:
.SUFFIXES:
LPAREN := (
RPAREN := )
###
# Clean
###
TARGET := awscli_saml.egg-info build target
.PHONY: clean
clean:
rm -fr $(TARGET)
###
# Format
###
FORMAT_SRC := $(shell find . $(TARGET:%=-not \$(LPAREN) -name % -prune \$(RPAREN)) -name '*.py')
.PHONY: format
format: target/format.log
.PHONY: test-format
test-format: target/format-test.log
target/format.log: $(FORMAT_SRC)
black $(FORMAT_SRC)
mkdir -p $(@D)
touch $@ target/format-test.log
target/format-test.log: $(FORMAT_SRC)
black --check $(FORMAT_SRC)
mkdir -p $(@D)
touch $@ target/format.log
###
# Pip
###
PY_SRC := $(shell find . $(TARGET:%=-not \$(LPAREN) -name % -prune \$(RPAREN)) -name '*.py')
.PHONY: install
install:
pip3 install -e .
.PHONY: package
package: target/package.log
upload: target/package-test.log
python3 -m twine upload target/package/*
target/package.log: setup.py README.md $(PY_SRC)
rm -fr $(@:.log=)
mkdir -p $(@:.log=)
./$< bdist_wheel -d $(@:.log=) sdist -d $(@:.log=)
> $@
target/package-test.log: target/package.log
python3 -m twine check target/package/*
mkdir -p $(@D)
> $@
###
# Docker
###
.PHONY: docker
docker:
docker build -t rivethealth/aws-saml .