It seems, a category and/or bugs field in the info.xml is required to push apps to the appstore.
Otherwise the store throws an error that the field dependencies is not expected. Also a summary field is required if the description field is longer than 128 characters.
Could we adjust the occ app:check-code command to also detect this?
I had this info.xml
<?xml version="1.0"?>
<info>
<id>files_linkeditor</id>
<name>Link editor</name>
<description>This application allows users to create and edit external links in their filelist (.URL and .webloc) and also to open the links when publicly shared.</description>
<licence>AGPL</licence>
<author>Thomas Ebert</author>
<version>1.0.2</version>
<dependencies>
<nextcloud min-version="13" max-version="13" />
</dependencies>
</info>
and got an error, because the description is too long to also the summary and something was missing before dependencies. However the command sudo -u www-data ./occ app:check-code files_linkeditor returned App is compliant - awesome job!.
I find that hard to debug if you only find errors in the info.xml in the process of uploading to the appstore. Maybe these rules are just too new to be covered by the check-code command already?
I find that hard to debug if you only find errors in the info.xml in the process of uploading to the appstore. Maybe these rules are just too new to be covered by the check-code command already?
No - you are right. We added some checks to the app store and forgot about the code checker.
cc @nickvergessen
@te-online do you want to work on this?
Maybe we can also use the .xsd file and validate against that:
https://github.com/nextcloud/appstore/blob/master/nextcloudappstore/api/v1/release/info.xsd
Then it would be enough to do changes in one place.
Never worked with command-line-php, but let me have a look tomorrow!
Well, let's be honest – I have no clue where to code even is...
I'm sorry, but somebody else has to take this one 😳
The code is in https://github.com/nextcloud/server/blob/eebd2811dc4427443f7be964be25c3596ef7e950/lib/private/App/CodeChecker/InfoChecker.php
I can give you hints if you still want to do it 😉 otherwise I can also take it over, no problem.
Okay, thanks for the hint. I could – of course – simply add the fields to the file. But what about the xsd file? Would you include a copy? Maybe there is a public permalink (but then the app-checker would need to download something, which is could be awkward...)?
I would include a copy of the file into the resources directory.
@nickvergessen Thanks for the response! I'm grateful you prepared everything so nicely for me to take over. But I'm sorry, I won't have the time to implement reading, parsing and validating against the XML file in the next weeks. So in a few minutes, I could very quickly add the fields to the array in the code you linked to earlier. However, to be honest, if you have time just go for it and implement the connection with the XML file so it's a maintainable solution in the future. ;-)
No problem, I will have a look then
Most helpful comment
@te-online do you want to work on this?
Maybe we can also use the
.xsdfile and validate against that:https://github.com/nextcloud/appstore/blob/master/nextcloudappstore/api/v1/release/info.xsd
Then it would be enough to do changes in one place.