|
1 | 1 | .DEFAULT_GOAL := help |
2 | 2 |
|
| 3 | +APP_ID := visionatrix |
| 4 | +APP_NAME := Visionatrix |
| 5 | +APP_VERSION := $$(xmlstarlet sel -t -v "//image-tag" appinfo/info.xml) |
| 6 | +JSON_INFO := "{\"id\":\"$(APP_ID)\",\"name\":\"$(APP_NAME)\",\"daemon_config_name\":\"manual_install\",\"version\":\"$(APP_VERSION)\",\"secret\":\"12345\",\"port\":9100, \"routes\": [{\"url\":\".*\",\"verb\":\"GET, POST, PUT, DELETE\",\"access_level\":1,\"headers_to_exclude\":[]}], \"translations_folder\":\"\/tmp\/vix_l10n\"}" |
| 7 | + |
| 8 | + |
3 | 9 | .PHONY: help |
4 | 10 | help: |
5 | | - @echo "Welcome to Nextcloud Visionatrix. Please use \`make <target>\` where <target> is one of" |
| 11 | + @echo " Welcome to $(APP_NAME) $(APP_VERSION)!" |
| 12 | + @echo " " |
| 13 | + @echo " Please use \`make <target>\` where <target> is one of" |
| 14 | + @echo " " |
| 15 | + @echo " build-push build CPU images and upload to ghcr.io" |
| 16 | + @echo " build-push-cuda build CUDA image and upload to ghcr.io" |
| 17 | + @echo " build-push-rocm build ROCM image and upload to ghcr.io" |
| 18 | + @echo " " |
| 19 | + @echo " > Next commands are only for the dev environment with nextcloud-docker-dev!" |
| 20 | + @echo " > They should run from the host you are developing on(with activated venv) and not in the container with Nextcloud!" |
| 21 | + @echo " " |
| 22 | + @echo " run30 install $(APP_NAME) for Nextcloud 30" |
| 23 | + @echo " run install $(APP_NAME) for Nextcloud Latest" |
| 24 | + @echo " " |
| 25 | + @echo " > Commands for manual registering of ExApp($(APP_NAME) should be running!):" |
| 26 | + @echo " " |
| 27 | + @echo " register30 perform registration of running $(APP_NAME) into the 'manual_install' deploy daemon." |
| 28 | + @echo " register perform registration of running $(APP_NAME) into the 'manual_install' deploy daemon." |
6 | 29 | @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 Visionatrix for Nextcloud Last" |
13 | | - @echo " " |
14 | | - @echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud." |
15 | | - @echo " First run original 'Visionatrix', then run this Visionatrix and then 'make registerXX', after that you can use/debug/develop it and easy test." |
16 | | - @echo " Do not forget to change paths in 'proxy_requests' function to point to correct files for the frontend" |
17 | | - @echo " " |
18 | | - @echo " register perform registration of running Visionatrix-es into the 'manual_install' deploy daemon." |
19 | | - @echo " " |
20 | 30 | @echo " L10N (for manual translation):" |
21 | 31 | @echo " translation_templates extract translation strings from sources" |
22 | 32 | @echo " convert_translations_nc convert translations to Nextcloud format files (json, js)" |
23 | | - @echo " convert_to_locale copy translations to the common locale/<lang>/LC_MESSAGES/<appid>.(po|mo)" |
| 33 | + @echo " convert_to_locale copy translations to the common locale/<lang>/LC_MESSAGES/<appid>.(po|mo)" |
24 | 34 |
|
25 | 35 | .PHONY: build-push-cpu |
26 | 36 | build-push-cpu: |
27 | 37 | npm ci && npm run build |
28 | 38 | docker login ghcr.io |
29 | | - docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/visionatrix:$$(xmlstarlet sel -t -v "//image-tag" appinfo/info.xml) --build-arg BUILD_TYPE=cpu . |
| 39 | + docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/$(APP_ID):$(APP_VERSION) --build-arg BUILD_TYPE=cpu . |
30 | 40 |
|
31 | 41 | .PHONY: build-push-cuda |
32 | 42 | build-push-cuda: |
33 | 43 | npm ci && npm run build |
34 | 44 | docker login ghcr.io |
35 | | - docker buildx build --push --platform linux/amd64 --tag ghcr.io/cloud-py-api/visionatrix:$$(xmlstarlet sel -t -v "//image-tag" appinfo/info.xml)-cuda --build-arg BUILD_TYPE=cuda . |
| 45 | + docker buildx build --push --platform linux/amd64 --tag ghcr.io/cloud-py-api/$(APP_ID):$(APP_VERSION)-cuda --build-arg BUILD_TYPE=cuda . |
36 | 46 |
|
37 | 47 | .PHONY: build-push-rocm |
38 | 48 | build-push-rocm: |
39 | 49 | npm ci && npm run build |
40 | 50 | docker login ghcr.io |
41 | | - docker buildx build --push --platform linux/amd64 --tag ghcr.io/cloud-py-api/visionatrix:$$(xmlstarlet sel -t -v "//image-tag" appinfo/info.xml)-rocm --build-arg BUILD_TYPE=rocm . |
| 51 | + docker buildx build --push --platform linux/amd64 --tag ghcr.io/cloud-py-api/$(APP_ID):$(APP_VERSION)-rocm --build-arg BUILD_TYPE=rocm . |
42 | 52 |
|
43 | 53 | .PHONY: run30 |
44 | 54 | run30: |
45 | | - docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister visionatrix --silent --force || true |
46 | | - docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register visionatrix \ |
47 | | - --info-xml https://raw.githubusercontent.com/cloud-py-api/visionatrix/main/appinfo/info.xml |
| 55 | + docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true |
| 56 | + docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) \ |
| 57 | + --info-xml https://raw.githubusercontent.com/cloud-py-api/$(APP_ID)/main/appinfo/info.xml |
48 | 58 |
|
49 | 59 | .PHONY: run |
50 | 60 | run: |
51 | | - docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister visionatrix --silent --force || true |
52 | | - docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register visionatrix \ |
53 | | - --info-xml https://raw.githubusercontent.com/cloud-py-api/visionatrix/main/appinfo/info.xml |
| 61 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true |
| 62 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) \ |
| 63 | + --info-xml https://raw.githubusercontent.com/cloud-py-api/$(APP_ID)/main/appinfo/info.xml |
| 64 | + |
| 65 | +.PHONY: register30 |
| 66 | +register30: |
| 67 | + docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true |
| 68 | + docker exec master-stable30-1 rm -rf /tmp/vix_l10n && docker cp ex_app/l10n master-stable30-1:/tmp/vix_l10n |
| 69 | + docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --wait-finish |
54 | 70 |
|
55 | 71 | .PHONY: register |
56 | 72 | register: |
57 | | - docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister visionatrix --silent --force || true |
| 73 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true |
58 | 74 | docker exec master-nextcloud-1 rm -rf /tmp/vix_l10n && docker cp ex_app/l10n master-nextcloud-1:/tmp/vix_l10n |
59 | | - docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register visionatrix manual_install --json-info \ |
60 | | - "{\"id\":\"visionatrix\",\"name\":\"Visionatrix\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9100,\"scopes\":[\"ALL\"], \"routes\": [{\"url\":\".*\",\"verb\":\"GET, POST, PUT, DELETE\",\"access_level\":1,\"headers_to_exclude\":[]}], \"translations_folder\":\"\/tmp\/vix_l10n\"}" \ |
61 | | - --wait-finish |
| 75 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --wait-finish |
62 | 76 |
|
63 | 77 | .PHONY: translation_templates |
64 | 78 | translation_templates: |
|
0 commit comments