Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-11-21 02:20:30 -04:00
5 changed files with 43 additions and 3 deletions

View File

@@ -178,9 +178,16 @@
generalized utility of the storages app.
- Add book link to the documentation.
3.3.11 (2019-XX-XX)
3.2.11 (2019-XX-XX)
===================
- Backport transaction handling to document model events.
- Update example LDAP authentication settings file.
- Update FAQ entry about the LDAP file.
- Automate documentation building dependencies.
- Add sphinx sitemap extension.
- Move the file patching code from the Dependency class to a
generalized utility of the storages app.
- Add book link to the documentation.
3.2.10 (2019-11-19)
===================

View File

@@ -242,10 +242,35 @@ generate-requirements: ## Generate all requirements files from the project deped
@./manage.py generaterequirements build > requirements/build.txt
@./manage.py generaterequirements development > requirements/development.txt
@./manage.py generaterequirements documentation > requirements/documentation.txt
@./manage.py generaterequirements production --only=pathlib2 >> requirements/documentation.txt
@./manage.py generaterequirements testing > requirements/testing-base.txt
@./manage.py generaterequirements production --exclude=django > requirements/base.txt
@./manage.py generaterequirements production --only=django > requirements/common.txt
gitlab-release-documentation: ## Trigger the documentation build and publication using GitLab CI
gitlab-release-documentation:
git push
git push origin :releases/documentation
git push origin HEAD:releases/documentation
gitlab-release-docker: ## Trigger the Docker image build and publication using GitLab CI
gitlab-release-docker:
git push
git push origin :releases/docker
git push origin HEAD:releases/docker
gitlab-release-python: ## Trigger the Python package build and publication using GitLab CI
gitlab-release-python:
git push
git push origin :releases/python
git push origin HEAD:releases/python
gitlab-release-all: ## Trigger the Python package, Docker image, and documentation build and publication using GitLab CI
gitlab-release-all:
git push
git push origin :releases/all
git push origin HEAD:releases/all
# Dev server
runserver: ## Run the development server.

View File

@@ -1,6 +1,7 @@
from __future__ import unicode_literals
import shutil
from pathlib2 import Path
import sphinx_rtd_theme

View File

@@ -8,6 +8,7 @@ import tempfile
from pathlib2 import Path
from django.utils.module_loading import import_string
from django.utils.six import PY3
from .settings import setting_temporary_directory
@@ -92,13 +93,18 @@ def patch_files(path=None, replace_list=None):
}
]
"""
if PY3:
file_open_mode = 'r+'
else:
file_open_mode = 'rb+'
path_object = Path(path)
for replace_entry in replace_list or []:
for path_entry in path_object.glob('**/{}'.format(replace_entry['filename_pattern'])):
if path_entry.is_file():
for pattern in replace_entry['content_patterns']:
with path_entry.open(mode='r+') as source_file_object:
with tempfile.TemporaryFile(mode='r+') as temporary_file_object:
with path_entry.open(mode=file_open_mode) as source_file_object:
with tempfile.TemporaryFile(mode=file_open_mode) as temporary_file_object:
source_position = 0
destination_position = 0

View File

@@ -5,3 +5,4 @@ sphinx_rtd_theme==0.4.3
sphinxcontrib-blockdiag==1.5.5
sphinxcontrib-spelling==4.2.1
tornado<6.0
pathlib2==2.3.5