-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (45 loc) · 1.2 KB
/
Makefile
File metadata and controls
53 lines (45 loc) · 1.2 KB
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
#!make
PRODUCT_FOLDER = ./Product/
SHELL := /bin/zsh
.DEFAULT_GOAL := install
MINT_DIRECTORY := ./mint/
## Setup
.PHONY: setup
setup: check-mint
@echo "🔨 Installing Ruby dependencies..."
bundle config set path 'vendor/bundle'
bundle install
@echo "🔨 Installing Mint dependencies..."
export MINT_PATH=$(MINT_DIRECTORY) && \
mint bootstrap
## Install
.PHONY: install
install: XcodeGen PodInstall
.PHONY: XcodeGen
XcodeGen: check-mint
@echo "🔨 Execute XcodeGen"
cd $(PRODUCT_FOLDER) && \
export MINT_PATH=$(MINT_DIRECTORY) && \
mint run yonaskolb/XcodeGen --quiet
.PHONY: PodInstall
PodInstall:
@echo "📦 Installing CocoaPods dependencies..."
cd $(PRODUCT_FOLDER) && \
bundle exec pod install
### Mint
check-mint: check-brew
@if ! command -v mint &> /dev/null; then \
echo "🔨 Installing mint..."; \
brew install mint; \
fi
### Brew
check-brew:
@if ! command -v brew &> /dev/null; then \
echo "🔨 Installing Homebrew..."; \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"; \
fi
## Format only git swift files
.PHONY: format
format: check-mint
export MINT_PATH=$(MINT_DIRECTORY) && \
mint run swiftformat $(PRODUCT_FOLDER)