cedaro / satispress

Expose installed WordPress plugins and themes as Composer packages.
500 stars 48 forks source link

when i update a plugin by ftp, the package.json not be update. #131

Closed zynfly closed 3 years ago

zynfly commented 4 years ago

when i update a plugin by ftp, the package.json not be update, but the page settings.php?page=satispress#satispress-packages is ok.

cfsegovia commented 4 years ago

Hi, I ran in the same problem, the trick is got to admin of packages and manually download, after that the packages are updated in the JSON, maybe the Team of satispress can put a hook to generate automatic the zip file and update the JSON file or cronjob for that, some ideas

tjedrak commented 3 years ago

I have the same issue, whenever I upload newest version by FTP or by Upload plugin (from Plugin panel) - .json file doesn't get any updates.

JanThiel commented 3 years ago

Same here. We deploy and update custom plugins using GIT or deploy scripts. Both do not create the necessary package files and thus using composer with these new versions fail.

Using WP-CLI or a WP-CRON to run the creation process would be a great way to automate this. Manually clicking a link doesn't really scale ;-)

Disabling and Enabling the Plugin for SatisPress also works fine. Just tried that out. Seems to me, that the package.json generation is just one step short :-)

Thanks and best regards, Jan

iljamm commented 3 years ago

same here, I uploaded an updated version of a plugin but it would not add that new version to packages.json file. as per @cfsegovia comment, downloading a new version of a plugin does force update of packages.json file.

danielbachhuber commented 3 years ago

Same issue for me 😄 If I replace the plugin via the "Upload Plugin" UX, the package.json isn't refreshed.

bradyvercher commented 3 years ago

I assumed if anyone was updating packages manually, they would generate the artifact manually since there isn't really a hook to monitor the filesystem. WP-CRON is an option, but it would still likely cause some confusion as well since it might take awhile for the updated release to become available.

The download route attempts to create artifacts on demand if they don't exist. I took the same approach when viewing packages.json so that the installed release could be cached automatically if it doesn't exist. That should cover all the use cases raised here (FTP, git, deploy scripts, upload through the admin UI).

I also added a routine when upgrading through the admin UI to cache the latest release for redundancy and to make sure it exists in the event any future functionality expects it to be there.

danielbachhuber commented 3 years ago

Thanks @bradyvercher !

JanThiel commented 3 years ago

Also thanks alot from my side :)