-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (56 loc) · 3.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.DEFAULT_GOAL := help
APP_ID := app-skeleton-python
APP_NAME := SkeletonApp
APP_VERSION := 2.0.0
JSON_INFO := "{\"id\":\"$(APP_ID)\",\"name\":\"$(APP_NAME)\",\"daemon_config_name\":\"manual_install\",\"version\":\"$(APP_VERSION)\",\"secret\":\"12345\",\"port\":9030}"
.PHONY: help
help:
@echo " Welcome to $(APP_NAME) $(APP_VERSION)!"
@echo " "
@echo " Please use \`make <target>\` where <target> is one of"
@echo " "
@echo " build-push builds CPU images and uploads them to ghcr.io"
@echo " "
@echo " > Next commands are only for the dev environment with nextcloud-docker-dev!"
@echo " > They must be run from the host you are developing on, not in a Nextcloud container!"
@echo " "
@echo " run29 installs $(APP_NAME) for Nextcloud 29"
@echo " run30 installs $(APP_NAME) for Nextcloud 30"
@echo " run installs $(APP_NAME) for Nextcloud Latest"
@echo " "
@echo " > Commands for manual registration of ExApp($(APP_NAME) should be running!):"
@echo " "
@echo " register29 performs registration of running $(APP_NAME) into the 'manual_install' deploy daemon."
@echo " register30 performs registration of running $(APP_NAME) into the 'manual_install' deploy daemon."
@echo " register performs registration of running $(APP_NAME) into the 'manual_install' deploy daemon."
.PHONY: build-push
build-push:
docker login ghcr.io
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/nextcloud/app-skeleton-python:latest .
.PHONY: run29
run29:
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register $(APP_ID) \
--info-xml https://raw.githubusercontent.com/nextcloud/$(APP_ID)/main/appinfo/info.xml
.PHONY: run30
run30:
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) \
--info-xml https://raw.githubusercontent.com/nextcloud/$(APP_ID)/main/appinfo/info.xml
.PHONY: run
run:
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) \
--info-xml https://raw.githubusercontent.com/nextcloud/$(APP_ID)/main/appinfo/info.xml
.PHONY: register29
register29:
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --wait-finish
.PHONY: register30
register30:
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
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
.PHONY: register
register:
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true
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