build: clean_translations without .git
We reimplement `make translations` so that it does not depend on the
presence of the `.git` directory. This fixes the Tutor build error:
> [production 18/34] RUN make clean_translations:
git clean -fdX conf/locale
fatal: not a git repository (or any of the parent directories): .git
make: *** [Makefile:57: clean_translations] Error 128
Why is the .git directory missing during the Tutor translations build?
Because if it were present, it would tie the translations' layer cache
up with git state, which would lead to the Docker layer being rebuilt
any time there was any change to git state.
This commit is contained in:
committed by
Kyle McCormick
parent
4d4f8f457d
commit
3dc5d9b984
3
Makefile
3
Makefile
@@ -54,7 +54,8 @@ pull_xblock_translations: ## pull xblock translations via atlas
|
||||
python manage.py cms compile_xblock_translations
|
||||
|
||||
clean_translations: ## Remove existing translations to prepare for a fresh pull
|
||||
git clean -fdX conf/locale # Removes core edx-platform translations but keeps Esperanto (eo) test translations
|
||||
# Removes core edx-platform translations but keeps config files and Esperanto (eo) test translations
|
||||
cd conf/locale && find . -type d -a ! -path . -a ! -path ./eo ! -path ./eo/* -exec rm -rf {} +
|
||||
# Removes the xblocks/plugins and js-compiled translations
|
||||
rm -rf conf/plugins-locale cms/static/js/i18n/ lms/static/js/i18n/ cms/static/js/xblock.v1-i18n/ lms/static/js/xblock.v1-i18n/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user