From 00251d7c66e60dc9859bf6368ab68d545660b90e Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 26 Mar 2020 13:32:08 +0100 Subject: [PATCH] Makefile: add target 'useragents.update' to fetch versions of Firefox Update searx/data/useragents.json with the most recent versions of Firefox. BTW: add 'useragents.update' to 'project' target and clean up the Makefile and remove it from the manage.sh script. Signed-off-by: Markus Heiser closes: https://github.com/asciimoo/searx/issues/1882 --- Makefile | 19 +++++++++++++------ manage.sh | 6 ------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 2bea06c9d..89e83dc59 100644 --- a/Makefile +++ b/Makefile @@ -74,14 +74,21 @@ $(GH_PAGES):: # update project files # -------------------- -PHONY += project engines-languages searx.brand +PHONY += project engines.languages searx.brand useragents.update -project: searx/data/engines_languages.json searx.brand +project: useragents.update engines.languages searx.brand -engines-languages: pyenvinstall - $(PY_ENV_ACT); python utils/fetch_languages.py - mv engines_languages.json searx/data/engines_languages.json - mv languages.py searx/languages.py +engines.languages: pyenvinstall + $(Q)echo "fetch languages .." + $(Q)$(PY_ENV_ACT); python utils/fetch_languages.py + $(Q)echo "update searx/data/engines_languages.json" + $(Q)mv engines_languages.json searx/data/engines_languages.json + $(Q)echo "update searx/languages.py" + $(Q)mv languages.py searx/languages.py + +useragents.update: pyenvinstall + $(Q)echo "Update searx/data/useragents.json with the most recent versions of Firefox." + $(Q)$(PY_ENV_ACT); python utils/fetch_firefox_version.py searx.brand: $(Q)echo "build searx/brand.py" diff --git a/manage.sh b/manage.sh index 4c11576a3..5c9b332aa 100755 --- a/manage.sh +++ b/manage.sh @@ -70,11 +70,6 @@ locales() { pybabel compile -d "$SEARX_DIR/translations" } -update_useragents() { - echo '[!] Updating user agent versions' - python utils/fetch_firefox_version.py -} - pep8_check() { echo '[!] Running pep8 check' # ignored rules: @@ -242,7 +237,6 @@ Commands update_dev_packages - Check & update development and production dependency changes install_geckodriver - Download & install geckodriver if not already installed (required for robot_tests) npm_packages - Download & install npm dependencies - update_useragents - Update useragents.json with the most recent versions of Firefox Build -----