1
- app_name =circles
1
+ app_name =Circles
2
2
3
3
build_dir =$(CURDIR ) /build/artifacts
4
4
appstore_dir =$(build_dir ) /appstore
5
5
source_dir =$(build_dir ) /source
6
6
sign_dir =$(build_dir ) /sign
7
- package_name =$(app_name )
7
+ package_name =$(shell echo $( app_name ) | tr '[:upper:]' '[:lower:]' )
8
8
cert_dir =$(HOME ) /.nextcloud/certificates
9
9
github_account =nextcloud
10
+ release_account =nextcloud-releases
10
11
branch =stable21
11
- version+ =0.21.2
12
+ version =0.21.3
13
+ since_tag =
12
14
13
15
all : appstore
14
16
15
17
release : appstore github-release github-upload
16
18
17
19
github-release :
20
+ if [ -z " $( release_account) " ]; then \
21
+ release_account=$(github_account ) ; \
22
+ release_branch=$(branch ) ; \
23
+ else \
24
+ release_account=$(release_account ) ; \
25
+ release_branch=master; \
26
+ fi ; \
27
+ if [ -z " $( since_tag) " ]; then \
28
+ latest_tag=$$(git describe --tags `git rev-list --tags --max-count=1` ) ; \
29
+ else \
30
+ latest_tag=$(since_tag ) ; \
31
+ fi ; \
32
+ comparison=" $$ latest_tag..HEAD" ; \
33
+ if [ -z " $$ latest_tag" ]; then comparison=" " ; fi ; \
34
+ changelog=$$(git log $$comparison --oneline --no-merges | sed -e 's/^/$(github_account ) \/$(package_name ) @/' ) ; \
18
35
github-release release \
19
- --user $(github_account ) \
20
- --repo $(app_name ) \
21
- --target $(branch ) \
22
- --tag v$(version ) \
23
- --name " $( app_name) v$( version) "
36
+ --user $$ release_account \
37
+ --repo $(package_name ) \
38
+ --target $$ release_branch \
39
+ --tag $(version ) \
40
+ --description " **Changelog**<br/>$$ changelog" \
41
+ --name " $( app_name) v$( version) " ; \
42
+ if [ $( github_account) != $$ release_account ]; then \
43
+ link=" https://github.com/$$ release_account/$( package_name) /releases/download/$( version) /$( package_name) -$( version) .tar.gz" ; \
44
+ github-release release \
45
+ --user $(github_account ) \
46
+ --repo $(package_name ) \
47
+ --target $(branch ) \
48
+ --tag $(version ) \
49
+ --description " **Download**<br />$$ link<br /><br />**Changelog**<br/>$$ changelog<br />" \
50
+ --name " $( app_name) v$( version) " ; \
51
+ fi ; \
52
+
24
53
25
54
github-upload :
55
+ if [ -z " $( release_account) " ]; then \
56
+ release_account=$(github_account ) ; \
57
+ else \
58
+ release_account=$(release_account ) ; \
59
+ fi ; \
26
60
github-release upload \
27
- --user $(github_account ) \
28
- --repo $(app_name ) \
29
- --tag v$(version ) \
30
- --name " $( app_name) -$( version) .tar.gz" \
31
- --file $(build_dir ) /$(app_name ) -$(version ) .tar.gz
61
+ --user $$ release_account \
62
+ --repo $(package_name ) \
63
+ --tag $(version ) \
64
+ --name " $( package_name) -$( version) .tar.gz" \
65
+ --file $(build_dir ) /$(package_name ) -$(version ) .tar.gz
66
+
32
67
33
68
clean :
34
69
rm -rf $(build_dir )
37
72
# composer packages
38
73
composer :
39
74
composer install --prefer-dist
75
+ composer upgrade --prefer-dist
40
76
41
77
appstore : clean composer
42
78
mkdir -p $(sign_dir )
@@ -53,16 +89,17 @@ appstore: clean composer
53
89
--exclude=/issue_template.md \
54
90
--exclude=/README.md \
55
91
--exclude=/composer.json \
92
+ --exclude=/testConfiguration.json \
56
93
--exclude=/composer.lock \
57
94
--exclude=/.gitattributes \
58
95
--exclude=/.gitignore \
59
96
--exclude=/.scrutinizer.yml \
60
97
--exclude=/.travis.yml \
61
98
--exclude=/Makefile \
62
- ./ $(sign_dir ) /$(app_name )
63
- tar -czf $(build_dir ) /$(app_name ) -$(version ) .tar.gz \
64
- -C $(sign_dir ) $(app_name )
65
- @if [ -f $( cert_dir) /$( app_name ) .key ]; then \
99
+ ./ $(sign_dir ) /$(package_name )
100
+ tar -czf $(build_dir ) /$(package_name ) -$(version ) .tar.gz \
101
+ -C $(sign_dir ) $(package_name )
102
+ @if [ -f $( cert_dir) /$( package_name ) .key ]; then \
66
103
echo " Signing package…" ; \
67
- openssl dgst -sha512 -sign $(cert_dir ) /$(app_name ) .key $(build_dir ) /$(app_name ) -$(version ) .tar.gz | openssl base64; \
104
+ openssl dgst -sha512 -sign $(cert_dir ) /$(package_name ) .key $(build_dir ) /$(package_name ) -$(version ) .tar.gz | openssl base64; \
68
105
fi
0 commit comments