@@ -4,7 +4,6 @@ PY?=python
4
4
TAR? =0
5
5
6
6
BINDIR =bin
7
- POFILESEXEC =$(BINDIR ) /pofiles.py
8
7
FRONTENDEXEC =$(BINDIR ) /frontend.py
9
8
10
9
REMOTEDATADIR =remote_data
@@ -26,13 +25,6 @@ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
26
25
current_dir := $(notdir $(patsubst % /,% ,$(dir $(mkfile_path ) ) ) )
27
26
ROOT_DIR: =$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST ) ) ) )
28
27
29
- ifeq ($(TAR ) , 0)
30
- POFILES_TAR_ARGS=to_tar
31
- else
32
- POFILES_TAR_ARGS=from_tar
33
- POFILES_TAR_ARGS+=$(TAR)
34
- endif
35
-
36
28
pysrcdirs = internetnl tests interface checks integration_tests
37
29
pysrc = $(shell find ${pysrcdirs} -name \* .py)
38
30
45
37
@echo ' Makefile for internet.nl'
46
38
@echo ' '
47
39
@echo ' Usage:'
48
- @echo ' make translations combine the translation files to Django PO files'
49
- @echo ' make translations_tar create a tar from the translations'
50
- @echo ' make translations_tar TAR=<tar.gz file> read the tar and update the translations'
40
+ @echo ' make update_content update the translation files from content repo.'
41
+ @echo ' Optional branch=x to use a specific content repo branch.'
51
42
@echo ' make frontend (re)generate CSS and Javascript'
52
43
@echo ' make update_padded_macs update padded MAC information'
53
44
@echo ' make update_cert_fingerprints update certificate fingerpint information'
@@ -69,25 +60,18 @@ frontend:
69
60
. .venv/bin/activate && ${_env} python3 manage.py collectstatic --no-input
70
61
. .venv/bin/activate && ${_env} python3 manage.py api_generate_doc
71
62
63
+ ${DOCKER_COMPOSE_TOOLS_CMD} run --rm tools bin/lint.sh ${pysrcdirs}
72
64
73
- translate_content_to_main :
74
- # Note: you may need to run this a few times to get rid of the access denied errors...
75
- # This retrieves the content from the content repository and merges it with the .po files of this repo.
76
- # The procedure is detailed at: https://github.com/internetstandards/Internet.nl_content/blob/master/.README.md
65
+ branch ?= main
66
+ update_content :
67
+ # This retrieves the content from the content repository and merges it with the .po files of this repo.
68
+ # The procedure is detailed at: https://github.com/internetstandards/Internet.nl_content/blob/master/.README.md
77
69
rm -rf tmp/locale_files/
78
70
rm -f tmp/content_repo.tar.gz
79
- git clone
[email protected] :internetstandards/Internet.nl_content/ tmp/locale_files/
80
-
81
- # If you need a specific branch people are working on:
82
- # git clone -b news-item_PLIS-meeting_on_IPv6 https://github.com/internetstandards/Internet.nl_content/ tmp/locale_files/
83
-
84
- # change dir to tmp to prevent the /tmp dir being mentioned in the resulting tar file.
85
- cd tmp && tar zcvf content_repo.tar.gz locale_files/*
86
- ${MAKE} translations_tar TAR=tmp/content_repo.tar.gz
87
- ${MAKE} translations
88
- . .venv/bin/activate && ${_env} python3 manage.py compilemessages --ignore=.venv
89
- # Purposefully _not_ deleting things in the tmp dir so it allows inspection after execution.
90
-
71
+ mkdir -p tmp/locale_files/
72
+ git clone -b $(branch)
[email protected] :internetstandards/Internet.nl_content/ tmp/locale_files/
73
+ ${DOCKER_COMPOSE_TOOLS_CMD} run --rm tools bin/update_translations.sh
74
+ rm -rf tmp/locale_files
91
75
92
76
update_padded_macs :
93
77
chmod +x $(MACSDIR ) /update-macs.sh
0 commit comments