Skip to content

Commit c3f8ff7

Browse files
committed
Add Makefile
1 parent c3b22e7 commit c3f8ff7

File tree

3 files changed

+50
-403
lines changed

3 files changed

+50
-403
lines changed

Makefile

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
app_name=files_mindmap
2+
3+
project_dir=$(CURDIR)/../$(app_name)
4+
build_dir=$(CURDIR)/build
5+
appstore_dir=$(build_dir)/appstore
6+
source_dir=$(build_dir)/source
7+
sign_dir=$(build_dir)/sign
8+
package_name=$(app_name)
9+
cert_dir=$(CURDIR)/../../key
10+
version+=0.0.3
11+
12+
all: appstore
13+
14+
release: appstore create-tag
15+
16+
create-tag:
17+
git tag -s -a v$(version) -m "Tagging the $(version) release."
18+
git push origin v$(version)
19+
20+
clean:
21+
rm -rf $(build_dir)
22+
23+
appstore: clean
24+
mkdir -p $(sign_dir)
25+
rsync -a \
26+
--exclude=/build \
27+
--exclude=/docs \
28+
--exclude=/translationfiles \
29+
--exclude=/tests \
30+
--exclude=/.git \
31+
--exclude=/CONTRIBUTING.md \
32+
--exclude=/issue_template.md \
33+
--exclude=/README.md \
34+
--exclude=/.gitignore \
35+
--exclude=/Makefile \
36+
$(project_dir)/ $(sign_dir)/$(app_name)
37+
38+
@if [[ -f $(cert_dir)/$(app_name).key && -f $(cert_dir)/$(app_name).crt ]]; then \
39+
../../occ integrity:sign-app --path $(sign_dir)/$(app_name) \
40+
--privateKey $(cert_dir)/$(app_name).key \
41+
--certificate $(cert_dir)/$(app_name).crt; \
42+
fi
43+
44+
tar -czf $(build_dir)/$(app_name)-$(version).tar.gz \
45+
-C $(sign_dir) $(app_name)
46+
47+
@if [ -f $(cert_dir)/$(app_name).key ]; then \
48+
echo "Signing package…"; \
49+
openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name)-$(version).tar.gz | openssl base64; \
50+
fi

0 commit comments

Comments
 (0)