forked from openedx/credentials-themes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (49 loc) · 2.84 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
.DEFAULT_GOAL := help
.PHONY: help build build.watch compile_translations detect_changed_source_translations dummy_translations \
extract_translations generate_translations base_requirements pull_translations push_translations \
requirements test upgrade validate_translations install_transifex_client
NODE_BIN=$(CURDIR)/node_modules/.bin
# Generates a help message. Borrowed from https://github.com/pydanny/cookiecutter-djangopackage.
help: ## display this help message
@echo "Please use \`make <target>\` where <target> is one of"
@awk -F ':.*?## ' '/^[a-zA-Z]/ && NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
build:
$(NODE_BIN)/webpack --config webpack.config.js --progress
build.watch:
$(NODE_BIN)/webpack --config webpack.config.js --progress --watch
compile_translations:
cd edx_credentials_themes && django-admin.py compilemessages
detect_changed_source_translations:
cd edx_credentials_themes && i18n_tool changed
dummy_translations:
cd edx_credentials_themes && i18n_tool dummy
extract_translations:
cd edx_credentials_themes && django-admin.py makemessages -l en -d django
generate_translations: extract_translations dummy_translations compile_translations
base_requirements:
pip install -r ./requirements/base.txt
# This Make target should not be removed since it is relied on by a Jenkins job (`edx-internal/tools-edx-jenkins/translation-jobs.yml`), using `ecommerce-scripts/transifex`.
pull_translations: ## Pull translations from Transifex
tx pull -t -a -f --mode reviewed --minimum-perc=1
# This Make target should not be removed since it is relied on by a Jenkins job (`edx-internal/tools-edx-jenkins/translation-jobs.yml`), using `ecommerce-scripts/transifex`.
push_translations: ## Push source translation files (.po) to Transifex
tx push -s
requirements: base_requirements
npm install
test:
# Confirm compiled assets have not changed, indicating SASS matches CSS.
git diff --exit-code edx_credentials_themes/
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade --rebuild --allow-unsafe -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip_tools.txt
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
validate_translations: generate_translations detect_changed_source_translations
cd edx_credentials_themes && i18n_tool validate
install_transifex_client: ## Install the Transifex client
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
git checkout -- LICENSE README.md