If an app requires a specific minor or path level server version,
the version_compare prevented the installation as only the major
version had been compared and that checks obviously returns `false`.
Now the full version is used for comparison, making it possible to
release apps for a specific minor or patch level version of Nextcloud.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* If the ETag if present store it
* If a stored ETag is present then pass it along (with the original
response) to get
* Add tests
* Added files to classmap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
As SemVer can be used apps could define a release like "10.0.0-alpha". This is something that we don't support at the moment in the server and we should filter all prereleases.
Ref https://github.com/nextcloud/server/pull/2307#issuecomment-262911588
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
The current implementation when fetching apps from the appstore is to assume that the first element is the newest version, this is now always applicable and leads to the fact that for some apps (e.g. nextant) the newest version is not delivered. This can be easily tested by comparing the version of the downloaded Nextant version.
This change will loop over all releases delivered by the appstore and chooses the newest compatible one. While not the cleanest solution, it does its job.
Most of the code are actually unit tests. Whereas I have copied the whole original response from the appstore and also have performed the transformation. So that's why the diff looks so huge.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>