forked from byassine52/Demo-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
151 lines (114 loc) · 4.2 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/env make -f
.PHONY: deploy install-dependencies install-gems install-pods update-dependencies update-gems update-pods build clean deply deploy-% upload-to-testflight docs setup
include .env
# Targets
print-environment:
@echo $(wildcard ./.env)
@echo APP_IDENTIFIER = "${APP_IDENTIFIER}"
@echo APP_NAME = "${APP_NAME}"
@echo FL_APPLE_ID = "${FL_APPLE_ID}"
@echo GIT_BRANCH = "${GIT_BRANCH}"
@echo ITC_TEAM_ID = "${ITC_TEAM_ID}"
@echo LANGUAGE = "${LANGUAGE}"
@echo TEAM_ID = "${TEAM_ID}"
@echo TEAM_NAME = "${TEAM_NAME}"
@echo XCODE_PROJECT = "${XCODE_PROJECT}"
@echo XCODE_SCHEME = "${XCODE_SCHEME}"
@echo XCODE_TARGET = "${XCODE_TARGET}"
@echo XCODE_UITESTS_SCHEME = "${XCODE_UITESTS_SCHEME}"
@echo XCODE_WORKSPACE = "${XCODE_WORKSPACE}"
clean: command-exists-bundle
bundle clean
bundle exec pod cache clean --all ${VERBOSE}
bundle exec fastlane run clean_build_artifacts ${VERBOSE}
bundle exec fastlane run clear_derived_data ${VERBOSE}
install-dependencies: install-gems install-pods
@echo Finished installing dependencies ...
install-gems: command-exists-bundle
@echo Updating bundler ...
gem update bundler ${VERBOSE}
@echo Installing gems ...
# Set local gem installation to main gems only
ifdef CI
@echo Configure Bundler for CI ...
bundle config unset --local clean
bundle config set --local without development
bundle config set --local deployment true
else
@echo Configure Bundler for development ...
# bundle config set --local clean true
bundle config unset --local without
bundle config unset --local deployment
endif
# Install bundles with multiple jobs for performance
bundle install --jobs 8 --retry 3 ${VERBOSE}
install-pods: command-exists-bundle
@echo Installing pods ...
bundle exec pod install --repo-update ${VERBOSE}
force-update-dependencies: force-update-gems force-update-pods
@echo Force update dependencies ...
force-update-gems: remove-gemfile-lock update-gems
@echo Force update gems ...
remove-gemfile-lock:
@echo Remove Gemfile.lock
rm -fv Gemfile.lock
force-update-pods: remove-podfile-lock update-pods
@echo Force update pods ...
remove-podfile-lock:
@echo Remove Podfile.lock
rm -fv Podfile.lock
update-dependencies: update-gems update-pods
@echo Finished updating dependencies ...
update-gems: command-exists-bundle
@echo Updating gems ...
bundle update
update-pods: command-exists-bundle
@echo Updating pods ...
bundle exec pod update ${VERBOSE}
build: generate-ipa-file
@echo building app ...
generate-ipa-file: command-exists-bundle
@echo building ".ipa" file ...
bundle exec fastlane generate_ipa_file
generate-app-file: command-exists-bundle
@echo building ".app" file ...
bundle exec fastlane generate_app_file
deploy: deploy-appstore deploy-next_generation
deploy-beta: deploy-build-beta
deploy-next_generation: deploy-build-next_generation
deploy-appstore: deploy-build-appstore
deploy-build-%: install-gems
@echo deploying app \(incrementing build for $(*)\) ...
bundle exec fastlane $(*) build_type:build --env $(*) ${VERBOSE}
deploy-patch-%: install-gems
@echo deploying app \(incrementing patch\) ...
bundle exec fastlane $(*) build_type:patch --env $(*) ${VERBOSE}
deploy-minor-%: install-gems
@echo deploying app \(incrementing minor\) ...
bundle exec fastlane $(*) build_type:minor --env $(*) ${VERBOSE}
deploy-major-%: install-gems
@echo deploying app \(incrementing major\) ...
bundle exec fastlane $(*) build_type:major --env $(*) ${VERBOSE}
increment_build_number:
@echo Incrementing build number app ...
bundle exec fastlane increment_version_with build_type:build commit_version_bump:true
upload-to-testflight:
@echo Uploading build to TestFlight ...
bundle exec fastlane deploy_to_testflight ${VERBOSE}
swiftgen:
Pods/SwiftGen/bin/swiftgen
lint:
Pods/SwiftLint/swiftlint
lint-fix:
Pods/SwiftLint/swiftlint --fix --format
renew-push-certificate:
bundle exec fastlane renew_push_certificate
docs:
@echo Generating documentation ...
bundle exec fastlane generate_docs
setup:
./setup.sh
# Convenience targets ############################################
command-exists-%:
@hash $(*) > /dev/null 2>&1 || \
(echo "ERROR: '$(*)' must be installed before running this target.\nPlease run 'make setup' and try again."; exit 1)