Skip to content
Draft
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
58 changes: 56 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
# SPDX-License-Identifier: AGPL-3.0-or-later

app_name=$(notdir $(CURDIR))
project_directory=$(CURDIR)/../$(app_name)
app_name="contacts"
project_folder="nextcloud-contacts"

project_directory=$(CURDIR)/../$(project_folder)
appstore_build_directory=$(CURDIR)/build/artifacts
appstore_package_name=$(appstore_build_directory)/$(app_name)

Expand All @@ -20,3 +22,55 @@ clean-dev:
# Builds the source package for the app store, ignores php and js tests
appstore:
krankerl package

# Builds the source package for the app store, ignores php and js tests
# command: make version={version_number} buildapp
# concatenate cd, ls and tar commands with '&&' otherwise the script context will remain the root instead of build
.PHONY: buildapp
buildapp:
make check-version

version=$(version)

make clean-buildapp

mkdir -p $(appstore_build_directory)
cd build && \
ln -s ../ $(app_name) && \
tar cvzfh $(appstore_build_directory)/$(app_name)_$(version).tar.gz \
--exclude="$(app_name)/build" \
--exclude="$(app_name)/release" \
--exclude="$(app_name)/tests" \
--exclude="$(app_name)/src" \
--exclude="$(app_name)/tests" \
--exclude="$(app_name)/vite.config.js" \
--exclude="$(app_name)/*.log" \
--exclude="$(app_name)/phpunit*xml" \
--exclude="$(app_name)/composer.*" \
--exclude="$(app_name)/node_modules" \
--exclude="$(app_name)/js/node_modules" \
--exclude="$(app_name)/js/tests" \
--exclude="$(app_name)/js/test" \
--exclude="$(app_name)/js/*.log" \
--exclude="$(app_name)/js/package.json" \
--exclude="$(app_name)/js/bower.json" \
--exclude="$(app_name)/js/karma.*" \
--exclude="$(app_name)/js/protractor.*" \
--exclude="$(app_name)/package.json" \
--exclude="$(app_name)/bower.json" \
--exclude="$(app_name)/karma.*" \
--exclude="$(app_name)/protractor\.*" \
--exclude="$(app_name)/.*" \
--exclude="$(app_name)/js/.*" \
--exclude-vcs \
$(app_name) && \
rm $(app_name)

clean-buildapp:
rm -rf ${appstore_build_directory}

check-version:
@if [ "${version}" = "" ]; then\
echo "Error: You must set version, eg. make -e version=v0.0.1 buildapp";\
exit 1;\
fi
7 changes: 7 additions & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

<background-jobs>
<job>OCA\Contacts\Cron\SocialUpdateRegistration</job>
<job>OCA\Contacts\Cron\UpdateOcmProviders</job>
</background-jobs>

<settings>
Expand All @@ -67,4 +68,10 @@
<contactsmenu>
<provider>OCA\Contacts\ContactsMenu\Providers\DetailsProvider</provider>
</contactsmenu>

<commands>
<command>OCA\Contacts\Command\EnableOcmInvites</command>
<command>OCA\Contacts\Command\DisableOcmInvites</command>
<command>OCA\Contacts\Command\SetMeshProvidersService</command>
</commands>
</info>
13 changes: 13 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

use OCA\Contacts\WayfProvider;
use OCA\Contacts\Service\FederatedInvitesService;

return [
'routes' => [
['name' => 'contacts#direct', 'url' => '/direct/contact/{contact}', 'verb' => 'GET'],
['name' => 'contacts#directcircle', 'url' => '/direct/circle/{singleId}', 'verb' => 'GET'],

['name' => 'federated_invites#get_invites', 'url' => '/ocm/invitations', 'verb' => 'GET'],
['name' => 'federated_invites#delete_invite', 'url' => '/ocm/invitations/{token}', 'verb' => 'DELETE'],
['name' => 'federated_invites#create_invite', 'url' => '/ocm/invitations', 'verb' => 'POST'],
['name' => 'federated_invites#accept_invite', 'url' => '/ocm/invitations/{token}/accept', 'verb' => 'PATCH'],
['name' => 'federated_invites#resend_invite', 'url' => '/ocm/invitations/{token}/resend', 'verb' => 'PATCH'],
['name' => 'federated_invites#invite_accept_dialog', 'url' => FederatedInvitesService::OCM_INVITE_ACCEPT_DIALOG_ROUTE, 'verb' => 'GET'],
['name' => 'federated_invites#wayf', 'url' => WayfProvider::WAYF_ROUTE, 'verb' => 'GET'],
['name' => 'federated_invites#discover', 'url' => WayfProvider::DISCOVERY_ROUTE, 'verb' => 'GET'],

['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'page#index', 'url' => '/{group}', 'verb' => 'GET', 'postfix' => 'group'],
['name' => 'page#index', 'url' => '/{group}/{contact}', 'verb' => 'GET', 'postfix' => 'group.contact'],
Expand Down
Loading