Skip to content

Commit

Permalink
adjust for second release (#85)
Browse files Browse the repository at this point in the history
Bugfix reelease

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
  • Loading branch information
bigcat88 committed Oct 6, 2023
1 parent b54621c commit 5008680
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 128 deletions.
3 changes: 0 additions & 3 deletions .nextcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
/.pre-commit-config.yaml
/babel.config.js
/build
/CHANGELOG.md
/APPS.md
/AUTHORS.md
/README.md
Expand All @@ -37,5 +36,3 @@
/stylelint.config.js
/webpack.*
tests
base_php.patch

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.0.1 - 2023-10-06]

### Fixed

- Invalid download of ex. applications from the AppStore. #88

## [1.0.0 - 2023-10-05]

### Added
Expand Down
35 changes: 4 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,25 @@ help:
@echo " "
@echo " Next commands are only for dev environment with nextcloud-docker-dev!"
@echo " Daemon register(Linux, socket):"
@echo " dock-sock create docker daemon for Nextcloud 28, 27, 26 (/var/run/docker.sock)"
@echo " dock-sock create docker daemon for Nextcloud 28, 27 (/var/run/docker.sock)"
@echo " dock-sock28 create docker daemon for Nextcloud 28 (/var/run/docker.sock)"
@echo " dock-sock27 create docker daemon for Nextcloud 27 (/var/run/docker.sock)"
@echo " dock-sock26 create docker daemon for Nextcloud 26 (/var/run/docker.sock)"
@echo " "
@echo " Daemon register(any OS, host:port)"
@echo " dock2port will map docker socket to port. first use this!"
@echo " dock-certs deploy certs, second use this!"
@echo " dock-port create docker daemons for Nextcloud 28, 27, 26 (host.docker.internal:8443)"
@echo " dock-port create docker daemons for Nextcloud 28, 27 (host.docker.internal:8443)"
@echo " dock-port28 create docker daemon for Nextcloud 28 (host.docker.internal:8443)"
@echo " dock-port27 create docker daemon for Nextcloud 27 (host.docker.internal:8443)"
@echo " dock-port26 create docker daemon for Nextcloud 26 (host.docker.internal:8443)"
@echo " "
@echo " "
@echo " example-deploy deploy Example App to docker"
@echo " example28 register & enable Example App in Nextcloud 28"
@echo " example27 register & enable Example App in Nextcloud 27"
@echo " example26 register & enable Example App in Nextcloud 26"

.PHONY: dock-sock
dock-sock:
$(MAKE) dock-sock28 dock-sock27 dock-sock26
$(MAKE) dock-sock28 dock-sock27

.PHONY: dock-sock28
dock-sock28:
Expand All @@ -52,13 +49,6 @@ dock-sock27:
docker exec master-stable27-1 sudo -u www-data php occ app_api:daemon:register \
docker_dev Docker docker-install unix-socket /var/run/docker.sock http://stable27/index.php --net=master_default

.PHONY: dock-sock26
dock-sock26:
@echo "creating daemon for nextcloud 'stable26' container"
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:daemon:unregister docker_dev || true
docker exec master-stable26-1 sudo -u www-data php occ app_api:daemon:register \
docker_dev Docker docker-install unix-socket /var/run/docker.sock http://stable26/index.php --net=master_default

.PHONY: dock2port
dock2port:
@echo "deploying kekru/docker-remote-api-tls..."
Expand All @@ -76,13 +66,10 @@ dock-certs:
@echo "copying certs to Nextcloud 27"
docker cp ./certs/client/ master-stable27-1:/ || echo "Failed copying certs to Nextcloud 27"
docker exec master-stable27-1 sudo -u www-data php occ security:certificates:import /client/ca.pem || true
@echo "copying certs to Nextcloud 26"
docker cp ./certs/client/ master-stable26-1:/ || echo "Failed copying certs to Nextcloud 26"
docker exec master-stable26-1 sudo -u www-data php occ security:certificates:import /client/ca.pem || true

.PHONY: dock-port
dock-port:
$(MAKE) dock-port28 dock-port27 dock-port26
$(MAKE) dock-port28 dock-port27

.PHONY: dock-port28
dock-port28:
Expand All @@ -100,14 +87,6 @@ dock-port27:
docker_dev Docker docker-install https host.docker.internal:6443 http://stable27/index.php \
--net=master_default --ssl_cert /client/cert.pem --ssl_key /client/key.pem

.PHONY: dock-port26
dock-port26:
@echo "creating daemon for nextcloud '26' container"
docker exec master-stable26-1 sudo -u www-data php occ app_api:daemon:unregister docker_dev || true
docker exec master-stable26-1 sudo -u www-data php occ app_api:daemon:register \
docker_dev Docker docker-install https host.docker.internal:6443 http://stable26/index.php \
--net=master_default --ssl_cert /client/cert.pem --ssl_key /client/key.pem

.PHONY: example-deploy
example-deploy:
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:deploy skeleton docker_dev \
Expand All @@ -124,9 +103,3 @@ example27:
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister skeleton --silent || true
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register skeleton docker_dev
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:enable skeleton

.PHONY: example26
example26:
docker exec master-stable26-1 sudo -u www-data php occ app_api:app:unregister skeleton --silent || true
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register skeleton docker_dev
docker exec master-stable26-1 sudo -u www-data php occ app_api:app:enable skeleton
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Tests](https://github.com/cloud-py-api/app_api/actions/workflows/tests.yml/badge.svg)](https://github.com/cloud-py-api/app_api/actions/workflows/tests.yml)
[![Docs](https://github.com/cloud-py-api/app_api/actions/workflows/docs.yml/badge.svg)](https://cloud-py-api.github.io/app_api/)

### Boost your Nextcloud with AppAPI and its specially designed applications.
### Supercharge your Nextcloud with AppAPI and applications specifically designed for it.

### This project pivots on four main pillars:

Expand All @@ -17,7 +17,7 @@
3. **Reliable computing power.** The ecosystem is designed to solve resource-intensive problems.
Developers can easily integrate complex computing functions, including advanced machine learning models, and run them on external hardware.

4. **Community friendly.** The project aims to attract a diverse and broader developer community by creating applications
4. **Community friendly** The project aims to attract a diverse and broader developer community by creating applications
in various programming languages and providing a well-documented, consistent and user-friendly API.
Community collaboration and contributions are encouraged to drive open source innovation.

Expand Down
24 changes: 12 additions & 12 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,42 @@
<summary>Nextcloud AppAPI</summary>
<description>
<![CDATA[
### Supercharge your Nextcloud with AppAPI and applications specifically designed for it.
### Boost your Nextcloud with AppAPI and its specially designed applications.
The AppAPI is a project within the Nextcloud ecosystem designed to streamline and enhance the process of
application development, deployment, and management. It introduces a new methodology that allows developers to create
application development, deployment, and management.
It introduces a new methodology that allows developers to create
applications using a variety of programming languages, not limited to PHP, which was traditionally used in Nextcloud development.
### List of applications that require AppAPI:
| Name | Language | Description | Link |
|---------------------|----------|---------------------|---------------------------------------------------------------|
| talk_bot_ai_example | Python | Talk Bot demo | [GitHub](https://github.com/cloud-py-api/talk_bot_ai_example) |
| upscaler_example | Python | Image UpScaler demo | [GitHub](https://github.com/cloud-py-api/upscaler_example) |
- [talk_bot_ai_example](https://github.com/cloud-py-api/talk_bot_ai_example)
- [upscaler_example](https://github.com/cloud-py-api/upscaler_example)
_If you wish to develop an application, we will gladly help and assist you._
### Support
We appreciate any support for this project:
- ⭐ Star our work on GitHub (it helps us a lot)
- ❗ Create an Issue or feature request (bring to us an excellent idea)
- 💁 Resolve an Issue and create a Pull Request (contribute to this project)
- 🧑‍💻 Develop your own application using AppAPI and share it with the world (contact us if help is needed)
- ⭐ Star our work on GitHub
- ❗ Create an Issue or feature request
- 💁 Resolve an Issue and create a Pull Request
- 🧑‍💻 Develop your own application using AppAPI
We are genuinely excited about the future of the AppAPI project and its potential to transform
the way applications are developed and experienced within Nextcloud.
As we embark on this journey, we warmly invite you - developers, thinkers, creators, and visionaries -
to join us in shaping a more versatile, stable, and secure app landscape.
#### Your insights, suggestions, and contributions are invaluable to us.
*Your insights, suggestions, and contributions are invaluable to us.*
]]></description>
<version>1.0.0</version>
<version>1.0.1</version>
<licence>agpl</licence>
<author mail="andrey18106x@gmail.com" homepage="https://github.com/andrey18106">Andrey Borysenko</author>
<author mail="bigcat88@icloud.com" homepage="https://github.com/bigcat88">Alexander Piskun</author>
Expand Down
37 changes: 0 additions & 37 deletions base_php.patch

This file was deleted.

43 changes: 0 additions & 43 deletions docs/DevSetup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,6 @@ AAfter this, you can enable it from the directory where the ``occ`` command resi

./occ app:enable --force app_api


Patching Nextcloud 26
"""""""""""""""""""""

Although only NextCloud since version 27.1 is officially supported, installation on NextCloud version 26 is possible.
If you are not using NextCloud version 26, you can skip this section.

The only changes to Nextcloud server are in ``base.php`` file, required only for **Nextcloud 26**.

.. code-block:: php
if (self::tryAppAPILogin($request)) {
return true;
}
And down below ``tryAppAPILogin`` method is added:

.. code-block:: php
protected static function tryAppAPILogin(OCP\IRequest $request): bool {
$appManager = Server::get(OCP\App\IAppManager::class);
if (!$request->getHeader('AUTHORIZATION-APP-API')) {
return false;
}
if (!$appManager->isInstalled('app_api')) {
return false;
}
try {
$appAPIService = Server::get(OCA\AppAPI\Service\AppAPIService::class);
return $appAPIService->validateExAppRequestToNC($request);
} catch (\Psr\Container\NotFoundExceptionInterface|\Psr\Container\ContainerExceptionInterface $e) {
return false;
}
}
.. note:: The patch itself can be found in the project root directory under the name ``base_php.patch``.

Apply the patch from the root directory of Nextcloud using :command:`patch`::

patch -p 1 -i apps/app_api/base_php.patch


In Place of a Conclusion
""""""""""""""""""""""""

Expand Down

0 comments on commit 5008680

Please sign in to comment.