civicrm / cv

CiviCRM CLI Utility
28 stars 30 forks source link

Command to update plugins to new version #187

Open yodatak opened 10 months ago

yodatak commented 10 months ago

Hello thanks for this cli i didn't find the command to update to news version the civicrm extentions did it exist or it must created ?

Thanks !

totten commented 10 months ago

Thanks @yodatak. The answer is... no+yes...

yodatak commented 7 months ago

Thanks here how i do but it don't work great :/

sudo -u civicrm php8.2 -f /usr/local/bin/cv vars:show | jq .CMS_VERSION sudo -u civicrm php8.2 -f /usr/local/bin/cv vars:show | jq .CIVI_VERSION

sudo -u civicrm php8.2 -f /usr/local/bin/cv ext:list -i sudo -u civicrm php8.2 -f /usr/local/bin/cv ext:download org.civicoop.civirules -d [PHP Deprecation] Creation of dynamic property Smarty_Internal_Extension_Handler::$loadFilter is deprecated at /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php:182 [PHP Deprecation] Creation of dynamic property Smarty_Internal_Extension_Handler::$loadPlugin is deprecated at /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php:182 [PHP Deprecation] Creation of dynamic property Smarty_Internal_Extension_Handler::$registerPlugin is deprecated at /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php:182 Using extension feed "https://civicrm.org/extdir/ver=5.72.1|uf=WordPress|status=stable|ready=ready" The extension "org.civicoop.civirules" already exists. What you like to do? [k] Keep existing extension. (Default) (Equivalent to option "-k") [d] Download anyway. (Equivalent to option "-f") [a] Abort

d Downloading extension "org.civicoop.civirules" (https://lab.civicrm.org/extensions/civirules/-/archive/3.5/civirules-3.5.zip) [PHP Deprecation] Creation of dynamic property GuzzleHttp\Psr7\LazyOpenStream::$stream is deprecated at /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php:33

and it stay runing but the download seem to work :/

MegaphoneJon commented 7 months ago

@yodatak

I think you want this line:

sudo -u civicrm php8.2 -f /usr/local/bin/cv ext:download org.civicoop.civirules -d

to be this?

sudo -u civicrm php8.2 -f /usr/local/bin/cv ext:download org.civicoop.civirules -f

Also - you may want to look at my script for finding which extensions need upgrading.

This version identifies all extensions that need updating, including those not approved for in-app distribution. To limit it just to those with in-app distribution, delete the getBrowser() function.