Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@

## [Unreleased]

### Added

- Add games category

### Removed

- Dropped Node.js 7 support and require Node.js 8+
- Dropped support for Nextcloud 9 and 10:
- owncloud tag in info.xml will not be migrated to nextcloud tags anymore
- ocsid will not be parsed anymore and was removed from the info.xsd
- old categories will not be migrated anymore (tool, game, productivity, other)
- presence of owncloud tag will not be validated anymore for apps depending on 9 and 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this means when an app only has the oc tag, nextcloud 13 will suggest it to install? :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, existing apps will continue to work but new uploads for 9 and 10 will not have all checks done that ensure that you can install them on 9 and 10

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And of course they will be required to add a nextcloud tag now because we don't guess it from the owncloud one any more

- v0 API was removed
- nextcloudrelease.json fixtures for 9 and 10 were removed
- Nextcloud 10 apps can not be generated anymore

## [2.0.0] - 2017-06-02

Expand Down
20 changes: 0 additions & 20 deletions docs/developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ A minimum valid **info.xml** would look like this:
<category>multimedia</category>
<bugs>https://github.com/nextcloud/news/issues</bugs>
<dependencies>
<!-- owncloud tag is required on Nextcloud 9 and 10 -->
<owncloud min-version="9.1"/>
<nextcloud min-version="10"/>
</dependencies>
</info>
Expand Down Expand Up @@ -213,8 +211,6 @@ A full blown example would look like this (needs to be utf-8 encoded):
<lib>curl</lib>
<lib>SimpleXML</lib>
<lib>iconv</lib>
<!-- owncloud tag is required on Nextcloud 9 and 10 -->
<owncloud min-version="9.0" max-version="9.1"/>
<nextcloud min-version="9" max-version="10"/>
</dependencies>
<background-jobs>
Expand Down Expand Up @@ -243,7 +239,6 @@ A full blown example would look like this (needs to be utf-8 encoded):
<commands>
<command>A\Php\Class</command>
</commands>
<ocsid>123</ocsid>
<settings>
<admin>OCA\Theming\Settings\Admin</admin>
<admin-section>OCA\Theming\Settings\Section</admin-section>
Expand Down Expand Up @@ -400,14 +395,6 @@ dependencies/nextcloud
* if absent white-listed owncloud versions will be taken from the owncloud element (see below)
* must contain a **min-version** attribute (maximum 3 digits separated by dots)
* can contain a **max-version** attribute (maximum 3 digits separated by dots)
dependencies/owncloud
* optional
* used for app migration period (Nextcloud 9 and 10)
* must contain a **min-version** attribute (**9.0** or **9.1**)
* can contain a **max-version** attribute (**9.0** or **9.1**)
* 9.0 will be migrated to Nextcloud 9
* 9.1 will be migrated to Nextcloud 10
* All other versions will be ignored
background-jobs/job
* optional
* must contain a php class which is run as background jobs
Expand Down Expand Up @@ -440,13 +427,6 @@ commands/command
* optional
* must contain a php class which is registered as occ command
* will not be used, only validated
ocsid
* optional
* used only to identify the app for Nextcloud versions 9 and 10
* equal to the id on the old app store, e.g. **https://apps.owncloud.com/content/show.php/Spreed.ME?content=174436** would use **174436**
* if not provided in your info.xml then the app will not be available for Nextcloud 9 and 10
* if you do not have an id yet, create an app on the apps.owncloud.com app store and use that id. This ensures that the id is unique and unused. You can delete the app afterwards if you do not want to publish your app on both stores.
* deprecated; Support will be moved once 9 an 10 run out of support
activity/settings/setting
* optional
* must contain a php class which implements OCP\Activity\ISetting and is used to add additional settings ui elements to the activity app
Expand Down
3 changes: 0 additions & 3 deletions docs/prodinstall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ To get your instance running in production you need to create your production se

# Additional variables that are used for generating apps
# APP_SCAFFOLDING_PROFILES = {
# 10: {
# 'owncloud_version': '9.1'
# },
# 11: {
# 'owncloud_version': '9.2'
# }
Expand Down
9 changes: 0 additions & 9 deletions docs/restapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ You have to design your app with these things in mind:
* Don't limit your app to the currently available attributes. New ones might be added. If you don't handle them, ignore them
* Use a library to compare versions, ideally one that uses semantic versioning

Legacy API
----------

Nextcloud 9 and 10 use the old App Store at https://apps.owncloud.com which exposes an XML API called OCS. This API is available under **https://apps.nextcloud.com/api/v0** and can be added to your Nextcloud installation by adding the following paramter to **config/config.php**::

'appstoreurl' => 'https://apps.nextcloud.com/api/v0',

.. note:: The API is undocumented on purpose and can be removed at any time so do not rely on it

Authentication
--------------

Expand Down
2 changes: 0 additions & 2 deletions nextcloudappstore/api/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from django.conf.urls import url, include

urlpatterns = [
url(r'^v0/', include('nextcloudappstore.api.v0.urls',
namespace='v0')),
url(r'^v1/', include('nextcloudappstore.api.v1.urls',
namespace='v1')),
]
Empty file.
11 changes: 0 additions & 11 deletions nextcloudappstore/api/v0/urls.py

This file was deleted.

62 changes: 0 additions & 62 deletions nextcloudappstore/api/v0/views.py

This file was deleted.

3 changes: 1 addition & 2 deletions nextcloudappstore/api/v1/release/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ def __init__(self, release_importer: AppReleaseImporter,
'summary': l10n_importer,
'description': l10n_importer,
'categories': category_importer,
'authors': author_importer,
'ocsid': default_attribute_importer,
'authors': author_importer
}, {'id'})

def _get_object(self, key: str, value: Any, obj: Any) -> Any:
Expand Down
2 changes: 0 additions & 2 deletions nextcloudappstore/api/v1/release/info.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
minOccurs="0" maxOccurs="1"/>
<xs:element name="commands" type="commands"
minOccurs="0" maxOccurs="1"/>
<xs:element name="ocsid" type="xs:int" minOccurs="0"
maxOccurs="1"/>
<xs:element name="settings" type="settings" minOccurs="0"
maxOccurs="1"/>
<xs:element name="activity" type="activity" minOccurs="0"
Expand Down
3 changes: 0 additions & 3 deletions nextcloudappstore/api/v1/release/info.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@
<issue-tracker>
<xsl:value-of select="bugs"/>
</issue-tracker>
<ocsid type="int">
<xsl:value-of select="ocsid"/>
</ocsid>

<!-- release -->
<release>
Expand Down
18 changes: 0 additions & 18 deletions nextcloudappstore/api/v1/release/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ def parse_app_metadata(xml: str, schema: str, pre_xslt: str,
transformed_doc = transform(pre_transformed_doc) # type: ignore
mapped = element_to_dict(transformed_doc.getroot()) # type: ignore
validate_english_present(mapped)
validate_pre_11(mapped, doc)
fix_partial_translations(mapped)
return mapped

Expand Down Expand Up @@ -304,23 +303,6 @@ def validate_database(xml: str, schema: str, pre_xslt: str) -> None:
raise InvalidAppMetadataXmlException(msg)


def validate_pre_11(info: Dict, doc: Any) -> None:
"""
Apps before 11 need to provide an owncloud min-version tag to run
:param info: the transformed and parsed info xml
:param doc: the original xml document
:raises: InvalidAppMetadataXmlException if no owncloud min-version is
present for apps with min-version 9 or 10
"""
min_version = Version(info['app']['release']['platform_min_version'])

test_xpath = 'dependencies/owncloud'
if min_version < Version('11.0.0') and len(doc.xpath(test_xpath)) == 0:
msg = '<owncloud> tag is required for apps that run on Nextcloud 9 ' \
'and 10'
raise InvalidAppMetadataXmlException(msg)


def validate_english_present(info: Dict) -> None:
"""
Validates that name, summary and description are present in english
Expand Down
64 changes: 1 addition & 63 deletions nextcloudappstore/api/v1/release/pre-info.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
<xsl:copy-of select="namespace"/>
<xsl:apply-templates select="types"/>
<xsl:apply-templates select="documentation"/>
<xsl:apply-templates select="category"/>
<xsl:if test="not(category)">
<category>tools</category>
</xsl:if>

<xsl:copy-of select="category"/>
<xsl:copy-of select="website"/>
<xsl:copy-of select="bugs"/>
<xsl:copy-of select="repository"/>
Expand All @@ -37,7 +33,6 @@
<xsl:apply-templates select="repair-steps"/>
<xsl:copy-of select="two-factor-providers"/>
<xsl:copy-of select="commands"/>
<xsl:copy-of select="ocsid"/>
<xsl:apply-templates select="settings"/>
<xsl:apply-templates select="activity"/>
<xsl:apply-templates select="navigations"/>
Expand Down Expand Up @@ -101,20 +96,6 @@
</documentation>
</xsl:template>

<xsl:template match="category">
<xsl:choose>
<xsl:when test=". = 'tool' or . = 'other' or . = 'game'">
<category>tools</category>
</xsl:when>
<xsl:when test=". = 'productivity'">
<category>organization</category>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="types">
<types>
<xsl:copy-of select="prelogin"/>
Expand All @@ -133,49 +114,6 @@
<xsl:copy-of select="lib"/>
<xsl:copy-of select="owncloud"/>
<xsl:copy-of select="nextcloud"/>
<xsl:if test="not(nextcloud)">
<xsl:variable name="min" select="owncloud/@min-version[.='9.0' or '9.1' or '9.2']"/>
<xsl:variable name="max" select="owncloud/@max-version[.='9.0' or '9.1' or '9.2']"/>
<!-- if someone knows a better way to do this in xslt 1.0 feel free to patch it :) -->
<xsl:if test="$min or $max">
<nextcloud>
<xsl:choose>
<xsl:when test="$min = '9.0'">
<xsl:attribute name="min-version">
<xsl:value-of select="'9'"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$min = '9.1'">
<xsl:attribute name="min-version">
<xsl:value-of select="'10'"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$min = '9.2'">
<xsl:attribute name="min-version">
<xsl:value-of select="'11'"/>
</xsl:attribute>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="$max = '9.0'">
<xsl:attribute name="max-version">
<xsl:value-of select="'9'"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$max = '9.1'">
<xsl:attribute name="max-version">
<xsl:value-of select="'10'"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$max = '9.2'">
<xsl:attribute name="max-version">
<xsl:value-of select="'11'"/>
</xsl:attribute>
</xsl:when>
</xsl:choose>
</nextcloud>
</xsl:if>
</xsl:if>
</dependencies>
</xsl:template>

Expand Down
Binary file modified nextcloudappstore/api/v1/tests/data/archives/full.tar.gz
Binary file not shown.
15 changes: 0 additions & 15 deletions nextcloudappstore/api/v1/tests/data/infoxmls/11.xml

This file was deleted.

15 changes: 0 additions & 15 deletions nextcloudappstore/api/v1/tests/data/infoxmls/9and10.xml

This file was deleted.

15 changes: 0 additions & 15 deletions nextcloudappstore/api/v1/tests/data/infoxmls/9and10invalid.xml

This file was deleted.

Loading