This commit is contained in:
Jonathan Treffler 2023-05-17 21:09:36 +02:00
parent 3c8db1d872
commit 27239be8c6
8 changed files with 4028 additions and 1 deletions

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
.idea
*.iml
/vendor/
/build/
/.php-cs-fixer.cache

29
Makefile Normal file
View file

@ -0,0 +1,29 @@
# This file is licensed under the Affero General Public License version 3 or
# later. See the COPYING file.
app_name=$(notdir $(CURDIR))
build_tools_directory=$(CURDIR)/build/tools
composer=$(shell which composer 2> /dev/null)
# Dev env management
dev-setup: composer
# Installs and updates the composer dependencies. If composer is not installed
# a copy is fetched from the web
composer:
ifeq (, $(composer))
@echo "No composer command available, downloading a copy from the web"
mkdir -p $(build_tools_directory)
curl -sS https://getcomposer.org/installer | php
mv composer.phar $(build_tools_directory)
php $(build_tools_directory)/composer.phar install --prefer-dist
php $(build_tools_directory)/composer.phar update --prefer-dist
else
composer install --prefer-dist
composer update --prefer-dist
endif
# Tests
test:
./vendor/phpunit/phpunit/phpunit -c phpunit.xml
./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml

View file

@ -1,2 +1,3 @@
# nextcloud_groupfolder_zfs_snapshots
# Nextcloud Groupfolder Filesystem Snapshots
App proving a PHP API for other apps, that allows restoring a groupfolder to a previous snapshot in the filesystem. Requires a ZFS filesystem.

17
appinfo/info.xml Normal file
View file

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>groupfolder_filesystem_snapshots</id>
<name>Groupfolder Filesystem Snapshots</name>
<summary>App proving a API for other apps, that allows restoring a groupfolder to a previous snapshot in the filesystem</summary>
<description>App proving a PHP API for other apps, that allows restoring a groupfolder to a previous snapshot in the filesystem. Requires a ZFS filesystem.</description>
<version>1.0.0</version>
<licence>agpl</licence>
<author mail="jonathan.treffler@verdigado.com" >Jonathan Treffler</author>
<namespace>GroupfolderFilesystemSnapshots</namespace>
<category>files</category>
<bugs>https://github.com/nextcloud/app-tutorial</bugs>
<dependencies>
<nextcloud min-version="25" max-version="25"/>
</dependencies>
</info>

4
appinfo/routes.php Normal file
View file

@ -0,0 +1,4 @@
<?php
return [
];

29
composer.json Normal file
View file

@ -0,0 +1,29 @@
{
"name": "verdigado/groupfolder_filesystem_snapshots",
"description": "App proving a API for other apps, that allows restoring a groupfolder to a previous snapshot in the filesystem",
"type": "project",
"license": "AGPL",
"authors": [
{
"name": "Jonathan Treffler",
"email": "jonathan.treffler@verdigado.com"
}
],
"require-dev": {
"phpunit/phpunit": "^9.5",
"nextcloud/coding-standard": "^1.0.0",
"nextcloud/ocp": "dev-stable25"
},
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true,
"platform": {
"php": "7.4"
}
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix"
}
}

3929
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,13 @@
<?php
namespace OCA\NotesTutorial\AppInfo;
use OCP\AppFramework\App;
class Application extends App {
public const APP_ID = 'groupfolder_filesystem_snapshots';
public function __construct() {
parent::__construct(self::APP_ID);
}
}