-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
70 lines (55 loc) · 2.14 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
68
69
70
# Copyright 2023 defsub
#
# This file is part of TakeoutFM.
#
# TakeoutFM is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# TakeoutFM is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
# more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with TakeoutFMFM. If not, see <https://www.gnu.org/licenses/>.
FLUTTER = flutter
VERSION = $(shell cat .version)
RELEASE_APK = build/app/outputs/flutter-apk/app-release.apk
RELEASE_AAB = build/app/outputs/bundle/release/app-release.aab
ASSETS = ./assets
.PHONY: all clean release assets analyze
all:
${MAKE} --directory=takeout_lib generate
${MAKE} --directory=takeout_mobile all
${MAKE} --directory=takeout_watch all
analyze:
${MAKE} --directory=takeout_lib analyze
${MAKE} --directory=takeout_mobile analyze
${MAKE} --directory=takeout_watch analyze
release:
${MAKE} --directory=takeout_lib generate
${MAKE} --directory=takeout_mobile release
${MAKE} --directory=takeout_watch release
bundle:
${MAKE} --directory=takeout_lib generate
${MAKE} --directory=takeout_mobile bundle
${MAKE} --directory=takeout_watch bundle
clean:
rm -rf ${ASSETS}
${MAKE} --directory=takeout_lib clean
${MAKE} --directory=takeout_mobile clean
${MAKE} --directory=takeout_watch clean
tag:
git tag --list | grep -q v${VERSION} || git tag v${VERSION}
git push origin v${VERSION}
assets:
@mkdir -p ${ASSETS}
@cp takeout_mobile/${RELEASE_APK} ${ASSETS}/com.takeoutfm.mobile-${VERSION}.apk || true
@cp takeout_mobile/${RELEASE_AAB} ${ASSETS}/com.takeoutfm.mobile-${VERSION}.aab || true
@cp takeout_watch/${RELEASE_APK} ${ASSETS}/com.takeoutfm.watch-${VERSION}.apk || true
@cp takeout_watch/${RELEASE_AAB} ${ASSETS}/com.takeoutfm.watch-${VERSION}.aab || true
version:
scripts/version.sh
publish: clean analyze version tag release assets