From ff2138384f0281b814fe41aa18561970e451cb52 Mon Sep 17 00:00:00 2001 From: Pedro Cisneros Santana Date: Wed, 20 Nov 2019 09:23:08 +0100 Subject: [PATCH] Update sdks.php Fixing license for python lang due to classifiers in order to upload to pypi --- app/tasks/sdks.php | 66 ++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 08c308882e..bca0213eb7 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -117,6 +117,38 @@ $cli ], ]; + # moved sdk before switch of langs in order to modify license + + $sdk = new SDK($language, new Swagger2($spec)); + + $sdk + ->setLicense('BSD-3-Clause') + ->setLicenseContent('Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.') + ->setVersion($client['version']) + ->setGitRepo($client['gitRepo']) + ->setGitURL($client['gitURL']) + ->setGitRepoName($client['gitRepoName']) + ->setGitUserName($client['gitUserName']) + ->setLogo('https://appwrite.io/images/github.png') + ->setURL('https://appwrite.io') + ->setShareText('Appwrite is a backend as a service for building web or mobile apps') + ->setShareURL('http://appwrite.io') + ->setShareTags('JS,javascript,reactjs,angular,ios,android') + ->setShareVia('appwrite_io') + ->setWarning($client['warning']) + ->setReadme(($client['readme'] && file_exists($client['readme'])) ? file_get_contents($client['readme']) : ''); + foreach ($clients as $name => $client) { Console::info('Fetching API Spec for '.$name.' ('.$client['platform'].')'); $spec = getSSLPage('https://appwrite.io/v1/open-api-2.json?extensions=1&platform='.$client['platform']); @@ -148,6 +180,9 @@ $cli $language = new Python(); $language ->setPipPackage('appwrite') + # license edited due to classifiers in pypi + $sdk + ->setLicense('BSD License'); ; break; case 'ruby': @@ -171,37 +206,6 @@ $cli break; } - $sdk = new SDK($language, new Swagger2($spec)); - - $sdk - ->setLicense('BSD-3-Clause') - ->setLicenseContent('Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.') - ->setVersion($client['version']) - ->setGitRepo($client['gitRepo']) - ->setGitURL($client['gitURL']) - ->setGitRepoName($client['gitRepoName']) - ->setGitUserName($client['gitUserName']) - ->setLogo('https://appwrite.io/images/github.png') - ->setURL('https://appwrite.io') - ->setShareText('Appwrite is a backend as a service for building web or mobile apps') - ->setShareURL('http://appwrite.io') - ->setShareTags('JS,javascript,reactjs,angular,ios,android') - ->setShareVia('appwrite_io') - ->setWarning($client['warning']) - ->setReadme(($client['readme'] && file_exists($client['readme'])) ? file_get_contents($client['readme']) : '') - ; - $target = __DIR__.'/../sdks/git/'.$name; Console::success("Generating {$name} SDK");