-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (53 loc) · 1.79 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
PRODUCT_NAME := Karazhan
PROJ_NAME := $(PRODUCT_NAME).xcodeproj
WORKSPACE_NAME := ${PRODUCT_NAME}.xcworkspace
BUNDLE=$(if $(rbenv > /dev/null), rbenv exec bundle, bundle)
FASTLANE=$(BUNDLE) exec fastlane
.PHONY: help
help: # Show this command list
@grep -E '^[a-zA-Z_-]+:.*?# .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":[^#]*? #| #"}; {printf "%-57s%s\n", $$1 $$3, $$2}'
.PHONY: setup-homebrew
setup-homebrew: # Setup Homebrew on the machine
brew update
brew upgrade
brew cleanup
.PHONY: install-rbenv
install-rbenv: # Install rbenv on the project folder
brew install rbenv
.PHONY: setup-rbenv
setup-rbenv: # Setup rbenv on the project folder
rbenv install -s
rbenv exec gem install bundler
.PHONY: install-bundler
install-bundler: # Install Bundler on the machine
sudo gem install bundler
.PHONY: setup-bundler
setup-bundler: # Setup Bundler on the project and create Gemfile
$(BUNDLE) init
$(MAKE) install-bundler-dependencies
.PHONY: install-bundler-dependencies
install-bundler-dependencies: # Install Bundler dependencies
$(BUNDLE) install
.PHONY: update-bundler-dependencies
update-bundler-dependencies: # Update Bundler dependencies
$(BUNDLE) update
.PHONY: setup-fastlane
setup-fastlane: # Setup Fastlane on the project
echo "gem 'fastlane'" >> Gemfile
$(MAKE) install-bundler-dependencies
.PHONY: setup
setup: # Install dependencies and prepare development configuration
$(MAKE) setup-homebrew
$(MAKE) install-rbenv
$(MAKE) setup-rbenv
# $(MAKE) install-bundler-dependencies
.PHONY: open
open: # Open xcodeproj/workspace in Xcode
@[ -f ./${WORKSPACE_NAME} ] && open ./${WORKSPACE_NAME} || open ./${PROJ_NAME} || echo Error to open Xcode project
.PHONY: clear
clear: # Clear cache
xcodebuild clean -alltargets
rm -rf ./Pods
rm -rf ./Carthage
rm -rf ./vendor/bundle
rm -rf ./Templates