Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile - github.com/nextcloud/files_rightclick.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c3e1de1b14c4449a5e0c7dcc2c58f02015b34fad (plain)
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
app_name=files_rightclick
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build
sign_dir=$(build_dir)/artifacts
cert_dir=$(HOME)/.nextcloud/certificates

all: appstore

clean:
	rm -rf $(build_dir)


app: clean
	mkdir -p $(sign_dir)
	rsync -a \
	--exclude=.* \
	--exclude=build \
    --exclude=CONTRIBUTING.md \
	--exclude=composer.json \
	--exclude=composer.lock \
	--exclude=composer.phar \
	--exclude=l10n/.tx \
	--exclude=l10n/no-php \
	--exclude=Makefile \
	--exclude=screenshots \
	--exclude=phpunit*xml \
	--exclude=tests \
	--exclude=vendor/bin \
	$(project_dir) $(sign_dir)
	tar -czf $(build_dir)/$(app_name).tar.gz \
		-C $(sign_dir) $(app_name)
	rm -rf $(build_dir)/artifacts


appstore: clean
	mkdir -p $(sign_dir)
	rsync -a \
	--exclude=.* \
	--exclude=build \
    --exclude=CONTRIBUTING.md \
	--exclude=composer.json \
	--exclude=composer.lock \
	--exclude=composer.phar \
	--exclude=l10n/.tx \
	--exclude=l10n/no-php \
	--exclude=Makefile \
	--exclude=screenshots \
	--exclude=phpunit*xml \
	--exclude=tests \
	--exclude=vendor/bin \
	$(project_dir) $(sign_dir)

	sed -i '/default_enable/d' $(sign_dir)/$(app_name)/appinfo/info.xml

	../../occ integrity:sign-app --path $(sign_dir)/$(app_name) \
			--privateKey $(cert_dir)/$(app_name).key \
			--certificate $(cert_dir)/$(app_name).crt; \

	tar -czf $(build_dir)/$(app_name).tar.gz \
		-C $(sign_dir) $(app_name)

	openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name).tar.gz | openssl base64 > $(build_dir)/$(app_name).b64
	rm -rf $(build_dir)/artifacts
	cat $(build_dir)/$(app_name).b64