forked from AlphaWallet/alpha-wallet-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
96 lines (79 loc) · 2.64 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
brew_cmd = brew
bundle_cmd = ./vendor/bundle/gems/bundler-2.2.33/exe/bundle
gem_cmd = gem
bundle_gem = "bundler:2.2.33"
vendor_path = ./vendor/bundle
beautify_cmd = ./Pods/xcbeautify/xcbeautify
all: target
@echo "Please specify a target. Please use 'make target' to show targets."
target:
@echo "install_bundle : install the correct version of bundle."
@echo "install_gems : install all the required gems."
@echo "install_pods : install all the cocoapods."
@echo "install_all : install gems then pods."
@echo "check_gems : check to see if all the gems in the Gemfile are installed in the vendor directory."
@echo "bootstrap : install bundle followed by install all."
@echo "test14 : run tests for iOS 14.5."
@echo "test15 : run tests for iOS 15.2."
@echo "test : run the tests for latest iOS (15.2)."
@echo "clean : Remove all the pods and gems."
check_brew:
@$(brew_cmd) --version 1>/dev/null 2>/dev/null; \
if [ $$? -ne 0 ]; then \
echo "Homebrew is not installed. Please install Homebrew."; \
exit 1; \
fi
check_bundle:
@$(bundle_cmd) --version 1>/dev/null 2>/dev/null; \
if [ $$? -ne 0 ]; then \
echo "Bundle does not exist. Please install bundle."; \
exit 1; \
fi
check_gems: check_bundle setup_path
@$(bundle_cmd) check --gemfile=./Gemfile; \
if [ $$? -eq 0 ]; then \
echo "All gems installed."; \
else \
echo "Some or all gemfiles have not been installed. Please use 'make install_gems'."; \
exit 1; \
fi
install_gems: check_bundle setup_path
@$(bundle_cmd) install --jobs=4; \
if [ $$? -ne 0 ]; then \
echo "Error installing."; \
exit 1; \
else \
echo "All gems installed."; \
fi
install_pods: check_gems
@$(bundle_cmd) exec pod install; \
if [ $$? -eq 0 ]; then \
echo "All pods installed."; \
else \
echo "Error installing."; \
exit 1; \
fi
update_pods: check_gems
@$(bundle_cmd) exec pod update; \
if [ $$? -eq 0 ]; then \
echo "All pods updated."; \
else \
echo "Error updating."; \
exit 1; \
fi
bootstrap: install_bundle install_all
install_all: setup_path install_gems install_pods
clean:
rm -rf $(vendor_path)
rm -rf ./Pods/*
release:
fastlane release
setup_path:
@$(bundle_cmd) config path $(vendor_path)
install_bundle:
@$(gem_cmd) install --install-dir=$(vendor_path) $(bundle_gem)
test15:
@xcodebuild -workspace AlphaWallet.xcworkspace -scheme AlphaWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.2' test | $(beautify_cmd)
test14:
@xcodebuild -workspace AlphaWallet.xcworkspace -scheme AlphaWallet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12,OS=14.5' test | $(beautify_cmd)
test: test15