forked from gjwgit/openai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
100 lines (76 loc) · 2.39 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
########################################################################
#
# Generic Makefile
#
# Time-stamp: <Monday 2024-04-15 09:06:45 +1000 Graham Williams>
#
# Copyright (c) [email protected]
#
# License: Creative Commons Attribution-ShareAlike 4.0 International.
#
########################################################################
# App is often the current directory name.
#
# App version numbers
# Major release
# Minor update
# Trivial update or bug fix
APP=$(shell pwd | xargs basename)
VER=
DATE=$(shell date +%Y-%m-%d)
# Identify a destination used by install.mk
DEST=/var/www/html/$(APP)
########################################################################
# Supported Makefile modules.
# Often the support Makefiles will be in the local support folder, or
# else installed in the local user's shares.
INC_BASE=support
# Specific Makefiles will be loaded if they are found in
# INC_BASE. Sometimes the INC_BASE is shared by multiple local
# Makefiles and we want to skip specific makes. Simply define the
# appropriate INC to a non-existant location and it will be skipped.
INC_DOCKER=skip
INC_MLHUB=skip
# Load any modules available.
INC_MODULE=$(INC_BASE)/modules.mk
ifneq ("$(wildcard $(INC_MODULE))","")
include $(INC_MODULE)
endif
########################################################################
# HELP
#
# Help for targets defined in this Makefile.
define HELP
$(APP):
solidcommunity Install to https://$(APP).solidcommunity.au
wc Count the number of lines of code.
endef
export HELP
help::
@echo "$$HELP"
########################################################################
# LOCAL TARGETS
locals:
@echo "This might be the instructions to install $(APP)"
.PHONY: docs
docs::
rsync -avzh doc/api/ [email protected]:/var/www/html/docs/$(APP)/
.PHONY: versions
versions:
perl -pi -e 's|applicationVersion = ".*";|applicationVersion = "$(VER)";|' \
lib/constants/app.dart
.PHONY: wc
wc:
@cat lib/*.dart lib/*/*.dart lib/*/*/*.dart \
| egrep -v '^/' \
| egrep -v '^ *$$' \
| wc -l
#
# Manage the production install on the remote server.
#
.PHONY: solidcommunity
solidcommunity:
rsync -avzh ./ solidcommunity.au:projects/$(APP)/ \
--exclude .dart_tool --exclude build --exclude ios --exclude macos \
--exclude linux --exclude windows --exclude android
ssh solidcommunity.au '(cd projects/$(APP); flutter upgrade; make prod)'