Debian Codegraph @

examples/as_app/talk_bot/Makefile

raw
1 .DEFAULT_GOAL := help
2
3 .PHONY: help
4 help:
5 @echo "Welcome to TalkBot example. Please use \`make <target>\` where <target> is one of"
6 @echo " "
7 @echo " Next commands are only for dev environment with nextcloud-docker-dev!"
8 @echo " They should run from the host you are developing on(with activated venv) and not in the container with Nextcloud!"
9 @echo " "
10 @echo " build-push build image and upload to ghcr.io"
11 @echo " "
12 @echo " run install TalkBot for Nextcloud Last"
13 @echo " run28 install TalkBot for Nextcloud 28"
14 @echo " "
15 @echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud."
16 @echo " First run 'TalkBot' and then 'make registerXX', after that you can use/debug/develop it and easy test."
17 @echo " "
18 @echo " register perform registration of running 'TalkBot' into the 'manual_install' deploy daemon."
19 @echo " register28 perform registration of running 'TalkBot' into the 'manual_install' deploy daemon."
20
21 .PHONY: build-push
22 build-push:
23 docker login ghcr.io
24 docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/talk_bot:latest .
25
26 .PHONY: run
27 run:
28 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister talk_bot --silent --force || true
29 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register talk_bot --force-scopes \
30 --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/talk_bot/appinfo/info.xml
31
32 .PHONY: run28
33 run28:
34 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister talk_bot --silent --force || true
35 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register talk_bot --force-scopes \
36 --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/talk_bot/appinfo/info.xml
37
38 .PHONY: register
39 register:
40 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister talk_bot --silent --force || true
41 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register talk_bot manual_install --json-info \
42 "{\"id\":\"talk_bot\",\"name\":\"TalkBot\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9032,\"scopes\":[\"TALK\", \"TALK_BOT\"]}" \
43 --force-scopes --wait-finish
44
45 .PHONY: register28
46 register28:
47 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister talk_bot --force || true
48 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register talk_bot manual_install --json-info \
49 "{\"id\":\"talk_bot\",\"name\":\"TalkBot\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9032,\"scopes\":[\"TALK\", \"TALK_BOT\"]}" \
50 --force-scopes --wait-finish