|
| 1 | +.DEFAULT_GOAL := help |
| 2 | + |
| 3 | +.PHONY: help |
| 4 | +help: |
| 5 | + @echo "Welcome to Vix. 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 " run28 install Visionatrix for Nextcloud 28" |
| 13 | + @echo " run29 install Visionatrix for Nextcloud 29" |
| 14 | + @echo " run install Visionatrix for Nextcloud Last" |
| 15 | + @echo " " |
| 16 | + @echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud." |
| 17 | + @echo " First run 'UiExample' and then 'make registerXX', after that you can use/debug/develop it and easy test." |
| 18 | + @echo " " |
| 19 | + @echo " register28 perform registration of running Visionatrix into the 'manual_install' deploy daemon." |
| 20 | + @echo " register29 perform registration of running Visionatrix into the 'manual_install' deploy daemon." |
| 21 | + @echo " register perform registration of running Visionatrix into the 'manual_install' deploy daemon." |
| 22 | + @echo " " |
| 23 | + @echo " L10N (for manual translation):" |
| 24 | + @echo " translation_templates extract translation strings from sources" |
| 25 | + @echo " convert_translations_nc convert translations to Nextcloud format files (json, js)" |
| 26 | + @echo " convert_to_locale copy translations to the common locale/<lang>/LC_MESSAGES/<appid>.(po|mo)" |
| 27 | + |
| 28 | +.PHONY: build-push |
| 29 | +build-push: |
| 30 | + docker login ghcr.io |
| 31 | + docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/vix:latest . |
| 32 | + |
| 33 | +.PHONY: run28 |
| 34 | +run28: |
| 35 | + docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister vix --silent --force || true |
| 36 | + docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register vix --force-scopes \ |
| 37 | + --info-xml https://raw.githubusercontent.com/cloud-py-api/vix/main/appinfo/info.xml |
| 38 | + |
| 39 | +.PHONY: run29 |
| 40 | +run29: |
| 41 | + docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister vix --silent --force || true |
| 42 | + docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register vix --force-scopes \ |
| 43 | + --info-xml https://raw.githubusercontent.com/cloud-py-api/vix/main/appinfo/info.xml |
| 44 | + |
| 45 | +.PHONY: run |
| 46 | +run: |
| 47 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister vix --silent --force || true |
| 48 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register vix --force-scopes \ |
| 49 | + --info-xml https://raw.githubusercontent.com/cloud-py-api/vix/main/appinfo/info.xml |
| 50 | + |
| 51 | +.PHONY: register28 |
| 52 | +register28: |
| 53 | + docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister vix --silent --force || true |
| 54 | + docker exec master-stable28-1 rm -rf /tmp/vix_l10n && docker cp l10n master-stable28-1:/tmp/vix_l10n |
| 55 | + docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register vix manual_install --json-info \ |
| 56 | + "{\"id\":\"vix\",\"name\":\"Visionatrix\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9045,\"scopes\":[\"OCC_COMMAND\", \"NOTIFICATIONS\"],\"system_app\":0, \"translations_folder\":\"\/tmp\/vix_l10n\"}" \ |
| 57 | + --force-scopes --wait-finish |
| 58 | + |
| 59 | +.PHONY: register29 |
| 60 | +register29: |
| 61 | + docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister vix --silent --force || true |
| 62 | + docker exec master-stable29-1 rm -rf /tmp/vix_l10n && docker cp l10n master-stable29-1:/tmp/vix_l10n |
| 63 | + docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register vix manual_install --json-info \ |
| 64 | + "{\"id\":\"vix\",\"name\":\"Visionatrix\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9045,\"scopes\":[\"OCC_COMMAND\", \"NOTIFICATIONS\"],\"system_app\":0, \"translations_folder\":\"\/tmp\/vix_l10n\"}" \ |
| 65 | + --force-scopes --wait-finish |
| 66 | + |
| 67 | +.PHONY: register |
| 68 | +register: |
| 69 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister vix --silent --force || true |
| 70 | + docker exec master-nextcloud-1 rm -rf /tmp/vix_l10n && docker cp l10n master-nextcloud-1:/tmp/vix_l10n |
| 71 | + docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register vix manual_install --json-info \ |
| 72 | + "{\"id\":\"vix\",\"name\":\"Visionatrix\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9045,\"scopes\":[\"OCC_COMMAND\", \"NOTIFICATIONS\"],\"system_app\":0, \"translations_folder\":\"\/tmp\/vix_l10n\"}" \ |
| 73 | + --force-scopes --wait-finish |
| 74 | + |
| 75 | +.PHONY: translation_templates |
| 76 | +translation_templates: |
| 77 | + ./translationtool.phar create-pot-files |
| 78 | + |
| 79 | +.PHONY: convert_translations_nc |
| 80 | +convert_translations_nc: |
| 81 | + ./translationtool.phar convert-po-files |
| 82 | + |
| 83 | +.PHONY: convert_to_locale |
| 84 | +convert_to_locale: |
| 85 | + ./scripts/convert_to_locale.sh |
0 commit comments