forked from internetstandards/Internet.nl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'internetstandards:main' into feature/881-tlsrpt
- Loading branch information
Showing
50 changed files
with
302 additions
and
493 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ PY?=python | |
TAR?=0 | ||
|
||
BINDIR=bin | ||
POFILESEXEC=$(BINDIR)/pofiles.py | ||
FRONTENDEXEC=$(BINDIR)/frontend.py | ||
|
||
REMOTEDATADIR=remote_data | ||
|
@@ -26,13 +25,6 @@ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | |
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) | ||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | ||
|
||
ifeq ($(TAR), 0) | ||
POFILES_TAR_ARGS=to_tar | ||
else | ||
POFILES_TAR_ARGS=from_tar | ||
POFILES_TAR_ARGS+=$(TAR) | ||
endif | ||
|
||
pysrcdirs = internetnl tests interface checks integration_tests | ||
pysrc = $(shell find ${pysrcdirs} -name \*.py) | ||
|
||
|
@@ -45,9 +37,8 @@ help: | |
@echo 'Makefile for internet.nl' | ||
@echo '' | ||
@echo 'Usage:' | ||
@echo ' make translations combine the translation files to Django PO files' | ||
@echo ' make translations_tar create a tar from the translations' | ||
@echo ' make translations_tar TAR=<tar.gz file> read the tar and update the translations' | ||
@echo ' make update_content update the translation files from content repo.' | ||
@echo ' Optional branch=x to use a specific content repo branch.' | ||
@echo ' make frontend (re)generate CSS and Javascript' | ||
@echo ' make update_padded_macs update padded MAC information' | ||
@echo ' make update_cert_fingerprints update certificate fingerpint information' | ||
|
@@ -69,25 +60,18 @@ frontend: | |
. .venv/bin/activate && ${_env} python3 manage.py collectstatic --no-input | ||
. .venv/bin/activate && ${_env} python3 manage.py api_generate_doc | ||
|
||
${DOCKER_COMPOSE_TOOLS_CMD} run --rm tools bin/lint.sh ${pysrcdirs} | ||
|
||
translate_content_to_main: | ||
# Note: you may need to run this a few times to get rid of the access denied errors... | ||
# This retrieves the content from the content repository and merges it with the .po files of this repo. | ||
# The procedure is detailed at: https://github.com/internetstandards/Internet.nl_content/blob/master/.README.md | ||
branch ?= main | ||
update_content: | ||
# This retrieves the content from the content repository and merges it with the .po files of this repo. | ||
# The procedure is detailed at: https://github.com/internetstandards/Internet.nl_content/blob/master/.README.md | ||
rm -rf tmp/locale_files/ | ||
rm -f tmp/content_repo.tar.gz | ||
git clone [email protected]:internetstandards/Internet.nl_content/ tmp/locale_files/ | ||
|
||
# If you need a specific branch people are working on: | ||
# git clone -b news-item_PLIS-meeting_on_IPv6 https://github.com/internetstandards/Internet.nl_content/ tmp/locale_files/ | ||
|
||
# change dir to tmp to prevent the /tmp dir being mentioned in the resulting tar file. | ||
cd tmp && tar zcvf content_repo.tar.gz locale_files/* | ||
${MAKE} translations_tar TAR=tmp/content_repo.tar.gz | ||
${MAKE} translations | ||
. .venv/bin/activate && ${_env} python3 manage.py compilemessages --ignore=.venv | ||
# Purposefully _not_ deleting things in the tmp dir so it allows inspection after execution. | ||
|
||
mkdir -p tmp/locale_files/ | ||
git clone -b $(branch) [email protected]:internetstandards/Internet.nl_content/ tmp/locale_files/ | ||
${DOCKER_COMPOSE_TOOLS_CMD} run --rm tools bin/update_translations.sh | ||
rm -rf tmp/locale_files | ||
|
||
update_padded_macs: | ||
chmod +x $(MACSDIR)/update-macs.sh | ||
|
@@ -651,12 +635,5 @@ documentation-images: ${images} | |
documentation/images/%.png: documentation/images/%.py | ${nwdiag} | ||
docker run -it --rm -v "$${PWD}/$(@D)/":/$(@D) -w /$(@D) gtramontina/diagrams:0.23.1 $(<F) | ||
|
||
batch-api-add-user docker-compose-batch-api-add-user: name=${username} | ||
batch-api-add-user docker-compose-batch-api-add-user: organization=internetnl | ||
batch-api-add-user docker-compose-batch-api-add-user: email=${username}@example.com | ||
batch-api-add-user docker-compose-batch-api-add-user: | ||
${DOCKER_COMPOSE_CMD} exec app ./manage.py api_users register -u ${username} -n ${name} -o ${organization} -e ${email} | ||
${DOCKER_COMPOSE_CMD} exec webserver htpasswd -b /etc/nginx/htpasswd/batch_api.htpasswd ${username} ${password} | ||
|
||
test-%: env=test | ||
test-up test-down test-build test-stop: test-%: % |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
tar --strip-components=1 -cf tmp/content_repo.tar.gz locale_files/* | ||
python3 bin/pofiles.py from_tar tmp/content_repo.tar.gz | ||
|
||
# to_django is performed in Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 3.2.23 on 2024-02-12 16:16 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("checks", "0014_auto_20230804_0855"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="batchuser", | ||
name="email", | ||
), | ||
migrations.RemoveField( | ||
model_name="batchuser", | ||
name="name", | ||
), | ||
migrations.RemoveField( | ||
model_name="batchuser", | ||
name="organization", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.