Debian Codegraph @

examples/as_app/to_gif/Makefile

raw
1 .DEFAULT_GOAL := help
2
3 GITHUB_USERNAME := cloud-py-api
4
5 APP_ID := to_gif
6 APP_NAME := ToGif
7 APP_VERSION := 1.0.0
8 APP_SECRET := 12345
9 APP_PORT := 9031
10
11 JSON_INFO := "{\"id\":\"$(APP_ID)\",\"name\":\"$(APP_NAME)\",\"daemon_config_name\":\"manual_install\",\"version\":\"$(APP_VERSION)\",\"secret\":\"$(APP_SECRET)\",\"port\":$(APP_PORT),\"routes\":[{\"url\":\".*\",\"verb\":\"GET, POST, PUT, DELETE\",\"access_level\":1,\"headers_to_exclude\":[]}]}"
12
13 .PHONY: help
14 help:
15 @echo "Welcome to $(APP_NAME). Please use \`make <target>\` where <target> is one of"
16 @echo " "
17 @echo " Next commands are only for dev environment with nextcloud-docker-dev!"
18 @echo " They should run from the host you are developing on(with activated venv) and not in the container with Nextcloud!"
19 @echo " "
20 @echo " build-push build image and upload to ghcr.io"
21 @echo " "
22 @echo " run28 install $(APP_NAME) for Nextcloud 28"
23 @echo " run29 install $(APP_NAME) for Nextcloud 29"
24 @echo " run30 install $(APP_NAME) for Nextcloud 30"
25 @echo " run install $(APP_NAME) for Nextcloud Latest"
26 @echo " "
27 @echo " For development of this example use PyCharm run configurations. Development is always set to the latest version of Nextcloud."
28 @echo " First run '$(APP_NAME)' and then 'make registerXX', after that you can use/debug/develop it and easy test."
29 @echo " "
30 @echo " register28 perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon."
31 @echo " register29 perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon."
32 @echo " register30 perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon."
33 @echo " register perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon."
34
35 .PHONY: build-push
36 build-push:
37 docker login ghcr.io
38 docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/$(GITHUB_USERNAME)/$(APP_ID):latest .
39
40 .PHONY: run28
41 run28:
42 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
43 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \
44 --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml
45
46 .PHONY: run29
47 run29:
48 docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
49 docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \
50 --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml
51
52 .PHONY: run30
53 run30:
54 docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
55 docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \
56 --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml
57
58 .PHONY: run
59 run:
60 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
61 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \
62 --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml
63
64 .PHONY: register28
65 register28:
66 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
67 docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish
68
69 .PHONY: register29
70 register29:
71 docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
72 docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish
73
74 .PHONY: register30
75 register30:
76 docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
77 docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish
78
79 .PHONY: register
80 register:
81 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
82 docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish