/
init_project.sh
63 lines (40 loc) · 1011 Bytes
/
init_project.sh
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
#!/bin/sh
# プロジェクトに、必要な初期設定などをします。
#
#
#
#
# HomeBrew
if [ ! -f "/usr/local/bin/brew" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# rbenv
if [ ! -f "/usr/local/bin/rbenv" ]; then
brew update
brew install rbenv
fi
# fix Ruby Version
rbenv local 2.1.0
# bundler
rbenv exec gem install bundler
rbenv rehash
touch Gemfile
echo "source \"https://rubygems.org\" " >> Gemfile
echo "gem 'fastlane', '1.89.0' " >> Gemfile
echo "gem 'cocoapods', '1.0.0' " >> Gemfile
rbenv exec bundle install --path bundle
# carthage
if [ ! -f "/usr/local/bin/carthage" ]; then
# carthage install
brew update
brew install carthage
fi
touch Cartfile #make Cartfile (like Podfile)
carthage update --platform iOS
#fastlane
rbenv exec bundle exec fastlane init
#cocoapods
rbenv exec bundle exec pod init
rbenv exec bundle exec pod install
#test
rbenv exec bundle exec fastlane test #run test code