-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
38 lines (30 loc) · 903 Bytes
/
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
NAME=xcstrings-enum-generate
FILENAME_USAGE=USAGE.md
BUILD_PATH=./.build/apple/Products/Release/
# TODO: get from ENV
EXPORT_PROJECT_ROOT=~/prj/business/quible/quible-ios
# TODO: remove other hard-coded paths
all: debug
./$(NAME) \
--xcstrings-path $(EXPORT_PROJECT_ROOT)/Quible/Resources/Localizable.xcstrings \
--enum-name XcodeString \
--enum-typealias X \
--output-filename $(EXPORT_PROJECT_ROOT)/Quible/Const/Generated/XcodeString.swift
debug:
swift build
cp ./.build/debug/$(NAME) .
release: clean
swift build -c release --arch x86_64 --arch arm64
cp $(BUILD_PATH)/$(NAME) .
cp xcstrings-enum-generate $(EXPORT_PROJECT_ROOT)/utility/
test:
swift test
clean:
rm -rf $(NAME)
doc:
echo "# USAGE" > $(FILENAME_USAGE)
echo >> $(FILENAME_USAGE)
echo '```console' >> $(FILENAME_USAGE)
./$(NAME) --help >> $(FILENAME_USAGE)
echo '```' >> $(FILENAME_USAGE)
publish: release doc