forked from kiwitcms/enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (35 loc) · 1.51 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
# *WARNING:* don't forget to update version in setup.py
KIWI_VERSION=9.0.1
ENTERPRISE_VERSION=$(KIWI_VERSION)-mt
.PHONY: build
build:
rm -rf dist/ build/ *.egg-info/
python setup.py sdist
python setup.py bdist_wheel
twine check dist/*
.PHONY: docker-image
docker-image: build
# everything else below is Enterprise + multi-tenant
docker build -t quay.io/kiwitcms/enterprise:$(ENTERPRISE_VERSION) .
docker tag quay.io/kiwitcms/enterprise:$(ENTERPRISE_VERSION) quay.io/kiwitcms/enterprise:latest
# tag the regular version so we can provide versioned images to enterprise customers
# so they can upgrade from kiwitcms/kiwi:latest before migrating to kiwitcms-enteprise
docker tag kiwitcms/kiwi:latest quay.io/kiwitcms/version:$(KIWI_VERSION)
.PHONY: flake8
flake8:
@flake8 --exclude=.git *.py tcms_enterprise tcms_settings_dir
KIWI_LINT_INCLUDE_PATH="../Kiwi"
.PHONY: pylint
pylint:
if [ ! -d "$(KIWI_LINT_INCLUDE_PATH)/kiwi_lint" ]; then \
git clone --depth 1 https://github.com/kiwitcms/Kiwi.git $(KIWI_LINT_INCLUDE_PATH); \
fi
PYTHONPATH=$(KIWI_LINT_INCLUDE_PATH):. \
DJANGO_SETTINGS_MODULE=l10n_settings \
pylint --load-plugins=pylint_django --load-plugins=kiwi_lint \
-d missing-docstring -d duplicate-code -d module-in-directory-without-init \
*.py tcms_enterprise/ tcms_settings_dir/
.PHONY: messages
messages:
./manage.py makemessages --settings l10n_settings --locale en --no-obsolete --ignore "test*.py"
ls tcms_enterprise/locale/*/LC_MESSAGES/*.po | xargs -n 1 -I @ msgattrib -o @ --no-fuzzy @