Update script for pods, submodules and groups creation
This commit is contained in:
parent
3fcf355e3a
commit
fa0837aeb6
19
bootstrap.sh
19
bootstrap.sh
|
|
@ -13,6 +13,7 @@ function generate {
|
|||
PROJECT_NAME=$1
|
||||
PROJECTS_PATH=$2
|
||||
COMMON_REPO_NAME=$3
|
||||
DEPLOYMENT_TARGET="10.0"
|
||||
|
||||
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
||||
TEMPLATES=$CURRENT_DIR/templates
|
||||
|
|
@ -39,9 +40,8 @@ mkdir $PROJECT_NAME
|
|||
# copy files
|
||||
cp -R $RESOURCES/. $PROJECT_NAME
|
||||
|
||||
|
||||
generate "{ name: $PROJECT_NAME }" $TEMPLATES/project.mustache project.yml
|
||||
generate "{ name: $PROJECT_NAME }" $TEMPLATES/Info.mustache $PROJECT_NAME/Info.plist
|
||||
generate "{ project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET }" $TEMPLATES/project.mustache project.yml
|
||||
generate "{ project_name: $PROJECT_NAME }" $TEMPLATES/Info.mustache $PROJECT_NAME/Info.plist
|
||||
|
||||
# generate xcode project file
|
||||
echo "Generate xcodeproj file..."
|
||||
|
|
@ -49,22 +49,19 @@ xcodegen # default to `project.yml`
|
|||
|
||||
|
||||
# install pods
|
||||
pod init
|
||||
generate "{ project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET }" $TEMPLATES/Podfile.mustache Podfile
|
||||
pod install
|
||||
|
||||
# configure submodules
|
||||
# git submodule add --name common git@github.com:TouchInstinct/$COMMON_REPO_NAME.git
|
||||
# git submodule add --name build-scripts git@github.com:TouchInstinct/BuildScripts.git
|
||||
#
|
||||
# git submodule update --init
|
||||
git submodule add --name common git@github.com:TouchInstinct/$COMMON_REPO_NAME.git
|
||||
git submodule add --name build-scripts git@github.com:TouchInstinct/BuildScripts.git
|
||||
|
||||
# do some stuff with provision profiles
|
||||
git submodule update --init
|
||||
|
||||
# enable shared scheme
|
||||
|
||||
# final clean up
|
||||
#### rm $PROJECT_CONFIG_FILENAME
|
||||
#### rm $PROJECT_XCODEGEN_FILENAME
|
||||
rm "project.yml"
|
||||
|
||||
# commit state
|
||||
#### git commit -m "Setup project configuration"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>{{name}}</string>
|
||||
<string>{{project_name}}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,24 @@
|
|||
source 'https://github.com/CocoaPods/Specs'
|
||||
source "https://github.com/TouchInstinct/Podspecs.git"
|
||||
|
||||
platform :ios, '<%= deployment_target %>'
|
||||
platform :ios, '{{deployment_target}}'
|
||||
|
||||
use_frameworks!
|
||||
inhibit_all_warnings!
|
||||
|
||||
project '<%= project_name %>', {
|
||||
project '{{project_name}}', {
|
||||
'StandardDebug' => :debug,
|
||||
'EnterpriseDebug' => :debug,
|
||||
'StandardRelease' => :release,
|
||||
'EnterpriseRelease' => :release
|
||||
}
|
||||
|
||||
target '<%= project_name %>' do
|
||||
pod 'LeadKit'
|
||||
pod 'Fabric'
|
||||
pod 'Crashlytics'
|
||||
pod 'SwiftLint'
|
||||
target '{{project_name}}' do
|
||||
pod 'Device.swift'
|
||||
# pod 'LeadKit'
|
||||
# pod 'Fabric'
|
||||
# pod 'Crashlytics'
|
||||
# pod 'SwiftLint'
|
||||
end
|
||||
|
||||
# If you have slow HDD
|
||||
|
|
@ -1,42 +1,42 @@
|
|||
name: {{name}}
|
||||
name: {{project_name}}
|
||||
options:
|
||||
createIntermediateGroups: true
|
||||
xcodeVersion: 9.2
|
||||
deploymentTarget:
|
||||
iOS: "10.0"
|
||||
iOS: "{{deployment_target}}"
|
||||
configs:
|
||||
StandardDebug: debug
|
||||
StandardRelease: release
|
||||
EnterpriseDebug: debug
|
||||
EnterpriseRelease: release
|
||||
targets:
|
||||
{{name}}:
|
||||
{{project_name}}:
|
||||
type: application
|
||||
platform: iOS
|
||||
sources:
|
||||
- path: {{name}}
|
||||
- path: {{project_name}}
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Analytics
|
||||
- path: {{project_name}}/Analytics
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Cells
|
||||
- path: {{project_name}}/Cells
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Controllers
|
||||
- path: {{project_name}}/Controllers
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Extensions
|
||||
- path: {{project_name}}/Extensions
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Generated
|
||||
- path: {{project_name}}/Generated
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Models
|
||||
- path: {{project_name}}/Models
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Networking
|
||||
- path: {{project_name}}/Networking
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Protocols
|
||||
- path: {{project_name}}/Protocols
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Realm
|
||||
- path: {{project_name}}/Realm
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Resources
|
||||
- path: {{project_name}}/Resources
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Services
|
||||
- path: {{project_name}}/Services
|
||||
buildPhase: sources
|
||||
- path: {{name}}/Views
|
||||
- path: {{project_name}}/Views
|
||||
buildPhase: sources
|
||||
|
|
|
|||
Loading…
Reference in New Issue