Created
June 21, 2023 17:38
-
-
Save chrisjangl/e7b10ea5bd1fd05ca5de3605987cb652 to your computer and use it in GitHub Desktop.
Revisions
-
chrisjangl created this gist
Jun 21, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ for plugin in $(wp --allow-root plugin list --update=available --status=inactive --field=name); do TITLE=$(wp --allow-root plugin get $plugin --field=title) # look into how we can mark the date here. Maybe also only output final result rm -r wp-content/plugins/$plugin/* && rmdir wp-content/plugins/$plugin git add -A wp-content/plugins/$plugin git commit -m "$(printf "delete plugin: $TITLE")" echo "$TITLE -> $VERSION" >> ./reports/deleted-plugins.txt done; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ for plugin in $(wp plugin list --update=available --status=active --field=name); do TITLE=$(wp plugin get $plugin --field=title) wp plugin update $plugin && VERSION=$(wp plugin get $plugin --field=version) git add -A wp-content/plugins/$plugin && git commit -m "$(printf "update plugin: $TITLE to $VERSION")" echo "$TITLE -> $VERSION" >> updated.txt done;