koderzi / php-github-updater

GitHub Release Updater is a PHP class that automates project updates based on the latest GitHub releases. Stay synced effortlessly and save time.
MIT License
2 stars 1 forks source link

Question on philosophy #2

Closed dbuerer closed 4 months ago

dbuerer commented 4 months ago

Curious as to your philosophy and status on this - first glad to see you started this, i was about to created something like this from scratch but thought i'd see if any one else had done it yet...and alas it is here.

How do you expected it to be used?

I see how it appears like you expected to be calling a status heartbeat periodically to find out how it's going....but the install and update process seems to be fairly flat.

Would you consider a few updates? I'd be happy to make them myself and just put them in a pull request. But thinking something like this:

  1. Add optional argument to the constructor, maybe something like $initializeOnly, that only set's it up the upgrade but does not call install directly
  2. create new public function checkVersion() that checks to see what the latest version is, returns the new version number and release notes
  3. manual triggering of update after the above.

I think all the updates could be made without breaking anything

Thoughts?

koderzi commented 4 months ago

Hi @dbuerer,

The concept behind the code was to streamline the updating process, leveraging cron for automation. The idea is that upon execution, the script checks for a new version; if an update is necessary, it proceeds, otherwise, it terminates. This simplicity is intentional, but the suggestions for enhancements are insightful.

koderzi commented 4 months ago

Upon reviewing, it is indeed necessary to make this update. It may be useful for anyone who wants to update manually. I have revised the code to incorporate this.