humbug / phar-updater

A thing to make PHAR self-updates easy and secure
BSD 3-Clause "New" or "Revised" License
368 stars 27 forks source link

Manifest file -based strategy #13

Closed pjcdawkins closed 8 years ago

pjcdawkins commented 8 years ago

Thanks for this library - I am going to use it instead of the abandoned project https://github.com/kherge-abandoned/php-phar-update. One advantage that had was to grab available versions and SHA1 hashes from a single "manifest" file.

I've written a custom strategy to handle this for our project: https://github.com/pjcdawkins/platformsh-cli/blob/replace-phar-update/src/SelfUpdate/ManifestStrategy.php

and here's what the manifest file looks like: https://platform.sh/cli/manifest.json

It seems like this could be generalised for anyone, would you be interested if I made a PR?

pjcdawkins commented 8 years ago

I can envisage more ideas here so I'll make a PR when I've got them ready