From 6cb1b679747ec578ca56f7a0fc03e5e98b9a9f1e Mon Sep 17 00:00:00 2001 From: "alvaro.gonzalez" Date: Fri, 8 Nov 2024 14:49:12 +0200 Subject: [PATCH 1/4] Revert "Update dependencies to match production (#44)" This reverts commit 079580275a9aadfa20e02e7b3803da24cbdfdb85. --- requirements.txt | 77 ++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/requirements.txt b/requirements.txt index 86c0e39..b8dd964 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,44 +1,51 @@ -# Additional packages for preview +# Packages for preview +# (commented-out already satisfied in packages for static sites) +# GitPython==3.1.41 Flask==2.2.5 + +# Dependencies for preview +# click==8.1.3 +# gitdb==4.0.9 +# importlib-metadata==4.12.0 itsdangerous==2.1.2 +# Jinja2==3.1.4 +# MarkupSafe==2.1.1 +# smmap==5.0.0 werkzeug==3.0.3 +# zipp==3.8.1 + # Packages for building the static pages -babel==2.16.0 -certifi==2024.7.4 -charset-normalizer==3.3.2 -click==8.1.7 -colorama==0.4.6 -feedparser==6.0.11 +# This is what we actually install +mkdocs==1.4.3 +mkdocs-git-revision-date-localized-plugin==1.1.0 +mkdocs-material==8.4.0 +mkdocs-material-extensions==1.0.3 +mkdocs-redirects==1.2.0 +mkdocs-section-index==0.3.4 +feedparser==6.0.10 + +# These are dependencies of the above +Babel==2.10.3 +click==8.1.3 ghp-import==2.1.0 -gitdb==4.0.11 -GitPython==3.1.43 -idna==3.7 -Jinja2==3.1.4 -Markdown==3.6 -MarkupSafe==2.1.5 +gitdb==4.0.9 +GitPython==3.1.41 +importlib-metadata==4.12.0 +Jinja2==3.1.3 +Markdown==3.3.7 +MarkupSafe==2.1.1 mergedeep==1.3.4 -mkdocs==1.6.0 -mkdocs-get-deps==0.2.0 -mkdocs-git-revision-date-localized-plugin==1.2.6 -mkdocs-material==9.5.31 -mkdocs-material-extensions==1.3.1 -mkdocs-redirects==1.2.1 -mkdocs-section-index==0.3.9 -packaging==24.1 -paginate==0.5.6 -pathspec==0.12.1 -platformdirs==4.2.2 -Pygments==2.18.0 -pymdown-extensions==10.9 -python-dateutil==2.9.0.post0 -pytz==2024.1 -PyYAML==6.0.2 -pyyaml_env_tag==0.1 -regex==2024.7.24 -requests==2.32.3 +packaging==21.3 +Pygments==2.15.0 +pymdown-extensions==10.3.1 +pyparsing==3.0.9 +python-dateutil==2.8.2 +pytz==2022.2.1 +PyYAML==6.0 +pyyaml-env-tag==0.1 sgmllib3k==1.0.0 six==1.16.0 -smmap==5.0.1 -urllib3==2.2.2 -watchdog==4.0.2 +smmap==5.0.0 +watchdog==2.1.9 +zipp==3.19.1 From 99fcb12ea5a4f5a1f8f809639b39b2681d1bb07f Mon Sep 17 00:00:00 2001 From: "alvaro.gonzalez" Date: Fri, 8 Nov 2024 14:50:54 +0200 Subject: [PATCH 2/4] Revert "Revert "Update dependencies to match production (#44)"" This reverts commit 6cb1b679747ec578ca56f7a0fc03e5e98b9a9f1e. --- requirements.txt | 77 ++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 42 deletions(-) diff --git a/requirements.txt b/requirements.txt index b8dd964..86c0e39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,51 +1,44 @@ -# Packages for preview -# (commented-out already satisfied in packages for static sites) -# GitPython==3.1.41 +# Additional packages for preview Flask==2.2.5 - -# Dependencies for preview -# click==8.1.3 -# gitdb==4.0.9 -# importlib-metadata==4.12.0 itsdangerous==2.1.2 -# Jinja2==3.1.4 -# MarkupSafe==2.1.1 -# smmap==5.0.0 werkzeug==3.0.3 -# zipp==3.8.1 - # Packages for building the static pages -# This is what we actually install -mkdocs==1.4.3 -mkdocs-git-revision-date-localized-plugin==1.1.0 -mkdocs-material==8.4.0 -mkdocs-material-extensions==1.0.3 -mkdocs-redirects==1.2.0 -mkdocs-section-index==0.3.4 -feedparser==6.0.10 - -# These are dependencies of the above -Babel==2.10.3 -click==8.1.3 +babel==2.16.0 +certifi==2024.7.4 +charset-normalizer==3.3.2 +click==8.1.7 +colorama==0.4.6 +feedparser==6.0.11 ghp-import==2.1.0 -gitdb==4.0.9 -GitPython==3.1.41 -importlib-metadata==4.12.0 -Jinja2==3.1.3 -Markdown==3.3.7 -MarkupSafe==2.1.1 +gitdb==4.0.11 +GitPython==3.1.43 +idna==3.7 +Jinja2==3.1.4 +Markdown==3.6 +MarkupSafe==2.1.5 mergedeep==1.3.4 -packaging==21.3 -Pygments==2.15.0 -pymdown-extensions==10.3.1 -pyparsing==3.0.9 -python-dateutil==2.8.2 -pytz==2022.2.1 -PyYAML==6.0 -pyyaml-env-tag==0.1 +mkdocs==1.6.0 +mkdocs-get-deps==0.2.0 +mkdocs-git-revision-date-localized-plugin==1.2.6 +mkdocs-material==9.5.31 +mkdocs-material-extensions==1.3.1 +mkdocs-redirects==1.2.1 +mkdocs-section-index==0.3.9 +packaging==24.1 +paginate==0.5.6 +pathspec==0.12.1 +platformdirs==4.2.2 +Pygments==2.18.0 +pymdown-extensions==10.9 +python-dateutil==2.9.0.post0 +pytz==2024.1 +PyYAML==6.0.2 +pyyaml_env_tag==0.1 +regex==2024.7.24 +requests==2.32.3 sgmllib3k==1.0.0 six==1.16.0 -smmap==5.0.0 -watchdog==2.1.9 -zipp==3.19.1 +smmap==5.0.1 +urllib3==2.2.2 +watchdog==4.0.2 From 68426711b62f60e3682dbd8ea2aa6db19d2cb210 Mon Sep 17 00:00:00 2001 From: "alvaro.gonzalez" Date: Fri, 8 Nov 2024 14:51:04 +0200 Subject: [PATCH 3/4] Revert "NO need for that" This reverts commit bd964d05694301725618c82162bbcb2dee0aff7a. --- app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.py b/app.py index d8b37e3..1863429 100755 --- a/app.py +++ b/app.py @@ -175,6 +175,8 @@ def listenBuild(secret): if not secret == config["secret"]: return "Access denied" + build() + response = Response('built started') response.call_on_close(build) From 96c8a3aba7dc4864600783da05bc75860890aeab Mon Sep 17 00:00:00 2001 From: "alvaro.gonzalez" Date: Fri, 8 Nov 2024 14:51:07 +0200 Subject: [PATCH 4/4] Revert "Revert "Use threads instead" (#45)" This reverts commit 256fad5b15c9f1d3586a74a623666779122ae248. --- app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 1863429..0616f45 100755 --- a/app.py +++ b/app.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import git, os, shutil, json +import git, os, shutil, json, threading from flask import Flask, Response @@ -179,7 +179,8 @@ def listenBuild(secret): response = Response('built started') - response.call_on_close(build) + thread = threading.Thread(target=build) + thread.start() return response @@ -187,6 +188,7 @@ def build(): print("Start build") + repo, origin = initRepo(config["workPath"], config["remoteUrl"]) output = "" @@ -229,7 +231,6 @@ def build(): exit(1) listenBuild(config["secret"]) - build() app.run(debug=config["debug"]=="True", port=defaultPort,