Prechádzať zdrojové kódy

upgrade venv

https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/47

draft
Chris Vogel 1 rok pred
rodič
commit
2370749704
3 zmenil súbory, kde vykonal 11 pridanie a 0 odobranie
  1. 9 0
      scripts/_common.sh
  2. 1 0
      scripts/install
  3. 1 0
      scripts/upgrade

+ 9 - 0
scripts/_common.sh

@@ -748,6 +748,15 @@ flohmarkt_ynh_create_venv() {
   python3 -m venv --without-pip "$flohmarkt_venv_dir"
 }
 
+flohmarkt_ynh_venv_upgrade() {
+  ynh_print_warn --message="flohmarkt_ynh_venv_upgrade: I'll sit here and do nothing without @grindholds confirmation"
+  true
+  (
+    $flohmarkt_venv_dir/bin/python3 -m venv --upgrade-deps
+  )
+}
+  
+
 # install requirements.txt in venv
 flohmarkt_ynh_venv_requirements() {
   (

+ 1 - 0
scripts/install

@@ -59,6 +59,7 @@ ynh_setup_source --dest_dir="$flohmarkt_app_dir"
 ynh_script_progression --message="Creating python venv..." --weight=2
 ynh_secure_remove "$flohmarkt_venv_dir"
 flohmarkt_ynh_create_venv
+flohmarkt_ynh_venv_upgrade
 flohmarkt_ynh_venv_requirements
 
 # JwtSecret

+ 1 - 0
scripts/upgrade

@@ -48,6 +48,7 @@ ynh_setup_source --dest_dir="$flohmarkt_app_dir/"
 
 ynh_script_progression --message="Upgrading flohmarkt python dependencies..." --weight=6
 # upgrade python environment / install new dependencies
+flohmarkt_ynh_venv_upgrade
 flohmarkt_ynh_venv_requirements
 
 # upgrade flohmarkt.conf