-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
66 lines (50 loc) · 2.36 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
.PHONY: all install list lint release test version build
PACKAGE := $(shell grep '^PACKAGE =' setup.py | cut -d "'" -f2)
VERSION := $(shell head -n 1 $(PACKAGE)/VERSION)
all: list
install:
pip install --upgrade -e .[develop]
install-speedup:
pip install --upgrade -e .[develop,speedup]
list:
@grep '^\.PHONY' Makefile | cut -d' ' -f2- | tr ' ' '\n'
lint:
pylama $(PACKAGE)
release:
bash -c '[[ -z `git status -s` ]]'
git tag -a -m release $(VERSION)
git push --tags
test:
tox &&\
tests/cli/test_cli_exit_codes.sh &&\
tests/cli/test_cli_logs.sh &&\
tests/cli/test_custom_formatters.sh &&\
tests/cli/test_exclude_dirnames.sh &&\
tests/cli/test_flow.sh
version:
@echo $(VERSION)
build:
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}"
docker pull frictionlessdata/datapackage-pipelines:latest &&\
docker build -t frictionlessdata/datapackage-pipelines:latest --cache-from frictionlessdata/datapackage-pipelines . &&\
docker build -t frictionlessdata/datapackage-pipelines:latest-alpine --cache-from frictionlessdata/datapackage-pipelines . &&\
docker build -t frictionlessdata/datapackage-pipelines:${VERSION} --cache-from frictionlessdata/datapackage-pipelines . &&\
docker build -t frictionlessdata/datapackage-pipelines:${VERSION}-alpine --cache-from frictionlessdata/datapackage-pipelines . &&\
docker pull frictionlessdata/datapackage-pipelines:latest-slim &&\
docker build -t frictionlessdata/datapackage-pipelines:latest-slim -f Dockerfile.slim --cache-from frictionlessdata/datapackage-pipelines:latest-slim . &&\
docker build -t frictionlessdata/datapackage-pipelines:${VERSION}-slim -f Dockerfile.slim --cache-from frictionlessdata/datapackage-pipelines:latest-slim .
deploy-latest:
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" &&\
docker push frictionlessdata/datapackage-pipelines:latest &&\
docker push frictionlessdata/datapackage-pipelines:latest-alpine &&\
docker push frictionlessdata/datapackage-pipelines:latest-slim
deploy-tags:
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" &&\
docker push frictionlessdata/datapackage-pipelines:${VERSION} &&\
docker push frictionlessdata/datapackage-pipelines:${VERSION}-alpine &&\
docker push frictionlessdata/datapackage-pipelines:${VERSION}-slim
deploy-pip:
rm -rf dist/ || true
pip install wheel twine
python setup.py sdist bdist_wheel
python -m twine upload dist/*