-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathMakefile
90 lines (65 loc) · 1.52 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
RUBY := $(shell command -v ruby 2>/dev/null)
HOMEBREW := $(shell command -v brew 2>/dev/null)
BUNDLER := $(shell command -v bundle 2>/dev/null)
default: setup
setup: \
pre_setup \
check_for_ruby \
check_for_homebrew \
update_homebrew \
install_carthage \
install_bundler_gem \
install_ruby_gems \
install_carthage_dependencies
pull_request: \
test \
codecov_upload \
danger
pre_setup:
$(info iOS project setup ...)
check_for_ruby:
$(info Checking for Ruby ...)
ifeq ($(RUBY),)
$(error Ruby is not installed)
endif
check_for_homebrew:
$(info Checking for Homebrew ...)
ifeq ($(HOMEBREW),)
$(error Homebrew is not installed)
endif
update_homebrew:
$(info Update Homebrew ...)
brew update
install_swift_lint:
$(info Install swiftlint ...)
brew unlink swiftlint || true
brew install swiftlint
brew link --overwrite swiftlint
install_bundler_gem:
$(info Checking and install bundler ...)
ifeq ($(BUNDLER),)
gem install bundler -v '~> 2.0'
else
gem update bundler '~> 2.0'
endif
install_ruby_gems:
$(info Install Ruby Gems ...)
bundle install
install_carthage:
$(info Install Carthage ...)
brew unlink carthage || true
brew install carthage
brew link --overwrite carthage
install_carthage_dependencies:
$(info Install Carthage Dependencies ...)
carthage bootstrap --platform ios --cache-builds
codecov_upload:
curl -s https://codecov.io/bash | bash
danger:
bundle exec danger
test:
bundle exec fastlane test
staging:
bundle exec fastlane test # staging
release:
bundle exec fastlane test # release