Compare commits

...

38 Commits

Author SHA1 Message Date
Loupehope dbc98c1b1a
Merge pull request #39 from TouchInstinct/feature/build_scripts
Feature - build scripts
2021-03-29 15:40:18 +03:00
Vlad 22e4e7416c Change TouchInstinct podspec source to ssh 2021-03-29 11:29:21 +03:00
Vlad 72c9b39413 Add custom schemes 2021-03-28 10:30:22 +03:00
Vlad 5f26513cd3 Correct smart build phases template 2021-03-27 09:13:50 +03:00
Vlad 94cc309f38 Correct smart build phases paths 2021-03-26 23:31:32 +03:00
Vlad c17e62dbcc Correct smart build phases 2021-03-26 23:25:11 +03:00
Vlad 62fa061757 Correct smart build phases and podfile 2021-03-26 23:20:14 +03:00
Vlad 14665ee6c1 Add smart build phases 2021-03-26 22:20:20 +03:00
Vsevolod Ivanov 6728e15dc6
Update README.md 2020-10-21 20:32:51 +03:00
Ivan Smolin 89fb115d33
Merge pull request #38 from TouchInstinct/feature/update_gitignore
update gitignore
2020-10-19 10:35:10 +03:00
Ivan Smolin 71a8ca8b4a update gitignore 2020-10-15 20:16:55 +03:00
Ivan Smolin eadc2ec7b0
Merge pull request #37 from TouchInstinct/feature/matchfile_generation
add Matchfile and configurations.yaml generation
2020-10-13 22:37:09 +03:00
Ivan Smolin 6849d77286 add Matchfile and configurations.yaml generation 2020-10-13 18:25:23 +03:00
Ivan Smolin c99ae7b66a
Merge pull request #36 from TouchInstinct/feature/generamba_templates_update
update Rambafile template
2020-10-09 15:14:29 +05:00
Ivan Smolin 0b0af0318d update Rambafile template 2020-10-09 13:05:15 +03:00
Ivan Smolin c0c08bd922
Merge pull request #34 from TouchInstinct/renew_scripts
renew scripts
2020-08-19 09:19:24 +03:00
Ivan Smolin d118f0aba5 renew scripts 2020-08-18 13:29:13 +03:00
Loupehope 1a65f719b8
Merge pull request #32 from TouchInstinct/feature/add_files
Add missing files
2020-06-24 14:14:51 +03:00
Vlad 1d8643bfe6 Update bootstrap 2020-06-24 13:48:41 +03:00
Vlad 29a37f28a1 Add missing files 2020-06-24 12:41:40 +03:00
Loupehope a7b6d24842
Merge pull request #31 from TouchInstinct/feature/update
Update scripts
2020-06-09 18:21:33 +03:00
Vlad 8ba7409516 Add *.swp to gitignore 2020-06-09 18:18:44 +03:00
Vlad 644078f0d0 Fix PR 2020-06-09 17:59:52 +03:00
Vlad 6b08cb831f Fix PR 2020-06-09 15:37:58 +03:00
Vlad f04a5322e6 Fix PR 2020-06-09 15:36:54 +03:00
Vlad bf61665c9a Fix PR 2020-06-09 15:12:05 +03:00
Vlad 51eeac7334 Fix PR 2020-06-09 15:10:36 +03:00
Vlad f42978b720 Replace struct with enum 2020-06-09 14:58:06 +03:00
Vlad 59a397c663 Add ITSAppUsesNonExemptEncryption 2020-06-09 14:50:40 +03:00
Vlad dff8f7188a Add version to swiftlint 2020-06-09 14:45:41 +03:00
Vlad beaf86b5ea Add String Constants 2020-06-09 14:37:56 +03:00
Vlad 48194befb9 Fix PR 2020-06-09 14:30:06 +03:00
Vlad 812fac8a74 Fix PR 2020-06-09 14:09:55 +03:00
Vlad 4e2142ed0b Remove fabric 2020-06-09 13:45:02 +03:00
Vlad b405367696 Remove romefile 2020-06-09 13:23:09 +03:00
Vlad 24d54a1f9f Update scripts 2020-06-09 13:21:18 +03:00
Vlad 5a8e779117 Fix indent 2020-06-09 12:43:05 +03:00
Vlad 186b7951cc Update scripts 2020-06-09 12:30:48 +03:00
30 changed files with 413 additions and 168 deletions

View File

@ -108,7 +108,7 @@ gem install bundle
- ПАРАМЕТР_3 (Опициональный) = Название репозитория с общими строками, без указания расширения `.git` и названия компании. Пример: `Bank-Common`, `Bank2-Common`. Если не указывать параметр, то будет использоваться имя проекта с постфиксом `-common`. Пример скрипта
```sh
igorkislyuk$ ./bootstrap.sh ~/Documents/projects/ Bank BankSpbJur-common
igorkislyuk$ ./bootstrap.sh ~/Documents/projects/ Bank Bank-common
```
### Шаг 4. После установки:

3
additional/Brewfile Normal file
View File

@ -0,0 +1,3 @@
brew "imagemagick"
brew "SwiftLint"
brew "pmd"

View File

@ -1,5 +1,7 @@
#!/bin/sh
# set -x # debug
function generate {
PARAMS=$1
TEMPLATE_PATH=$2
@ -11,13 +13,15 @@ function generate {
}
# define variables
PROJECTS_PATH=$1
PROJECT_NAME=$2
PROJECT_NAME_WITH_PREFIX=$2-ios
COMMON_REPO_NAME=${3:-$2-common}
DEPLOYMENT_TARGET="10.0"
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
TEMPLATES=$CURRENT_DIR/templates
readonly PROJECTS_PATH=$1
readonly PROJECT_NAME=$2
readonly PROJECT_NAME_WITH_PREFIX=$2-ios
readonly COMMON_REPO_NAME=${3:-$2-common}
readonly DEPLOYMENT_TARGET="12.0"
readonly CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
readonly TEMPLATES=$CURRENT_DIR/templates
readonly MATCH_PASSWORD=`pwgen 8 1`
readonly GIT_URL="git@github.com:TouchInstinct/${PROJECT_NAME_WITH_PREFIX}.git"
cd $PROJECTS_PATH
@ -33,7 +37,7 @@ rm -rf $(ls)
# create git if not exists
if [ ! -d .git ]; then
git init
git remote add origin git@github.com:TouchInstinct/$PROJECT_NAME_WITH_PREFIX.git
git remote add origin ${GIT_URL}
git fetch
git checkout -t origin/master
else
@ -48,7 +52,7 @@ mkdir -p $PROJECT_NAME
cp -R $CURRENT_DIR/sources/project/. $PROJECT_NAME
cp -R $CURRENT_DIR/sources/fastlane/. fastlane
# create each empty folder in location from file, except Resources, all folders with files inside
# create each empty folder in location from file, except Resources, Models and Appearance, all folders with files inside
for folder in `cat $CURRENT_DIR/foldernames.txt`; do
echo "Creating $folder ..."
mkdir -p $PROJECT_NAME/$folder
@ -58,25 +62,28 @@ done
cp $CURRENT_DIR/sources/Gemfile Gemfile
cp $CURRENT_DIR/sources/Gemfile.lock Gemfile.lock
cp $CURRENT_DIR/sources/Brewfile Brewfile
gem install bundler
bundle install
brew bundle
# create info plist
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Info.mustache $PROJECT_NAME/Info.plist
# generate services
DATE_SERVICE_NAME="DateFormattingService"
readonly DATE_SERVICE_NAME="DateFormattingService"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/dateformatservice.mustache $PROJECT_NAME/Services/"$PROJECT_NAME$DATE_SERVICE_NAME".swift
NUMBER_SERVICE_NAME="NumberFormattingService"
readonly NUMBER_SERVICE_NAME="NumberFormattingService"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/numberformatservice.mustache $PROJECT_NAME/Services/"$PROJECT_NAME$NUMBER_SERVICE_NAME".swift
TABLE_CONTENT_CONTROLLER_NAME="TableContentController"
readonly TABLE_CONTENT_CONTROLLER_NAME="TableContentController"
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/tablecontentcontroller.mustache $PROJECT_NAME/Controllers/"$PROJECT_NAME$TABLE_CONTENT_CONTROLLER_NAME".swift
# generate file for generate xcodeproj
LOWERCASED_PROJECT_NAME=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]')
readonly LOWERCASED_PROJECT_NAME=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]')
generate "{project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET, project_name_lowecased: $LOWERCASED_PROJECT_NAME}" \
$TEMPLATES/project.mustache \
project.yml
@ -85,6 +92,11 @@ generate "{project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET, p
echo "Generate xcodeproj file..."
xcodegen --spec project.yml
# conifgure build_phases folder
cp -r $CURRENT_DIR/sources/build_phases ./build_phases
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/build_phases/code_lint_folders.mustache build_phases/code_lint_folders.xcfilelist
# creating .gitkeep in each folder to enforce git stash this folder
for folder in `cat $CURRENT_DIR/foldernames.txt`; do
touch $PROJECT_NAME/$folder/.gitkeep
@ -92,20 +104,32 @@ done
# install pods
generate "{project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET}" $TEMPLATES/Podfile.mustache Podfile
pod repo update
pod install
# install carthage
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Cartfile.mustage Cartfile
carthage update
bundle exec pod install --repo-update
# configure git files
cp $TEMPLATES/gitignore .gitignore
cp $TEMPLATES/gitattributes .gitattributes
# configure git hooks
cp -r $CURRENT_DIR/sources/.githooks .githooks
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/githooks/post-merge.mustache .githooks/post-merge
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/githooks/pre-commit.mustache .githooks/pre-commit
chmod +x .githooks/post-merge
chmod +x .githooks/pre-commit
git config --local core.hooksPath .githooks
# configure fastlane
generate "{git_url: \"$GIT_URL\", match_password: $MATCH_PASSWORD}" $TEMPLATES/fastlane/Matchfile.mustache fastlane/Matchfile
generate "{project_name: $PROJECT_NAME, project_name_lowecased: $LOWERCASED_PROJECT_NAME}" $TEMPLATES/fastlane/configurations.yaml.mustache fastlane/configurations.yaml
# configure rambafile
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Rambafile.mustache Rambafile
generamba template install
bundle exec generamba template install
# configure README.md
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/README.mustache README.md
@ -117,14 +141,27 @@ git submodule add git@github.com:TouchInstinct/BuildScripts.git build-scripts
git submodule update --init
# final clean up
rm Gemfile*
rm Brewfile*
rm project.yml
# install additional brews
cp $CURRENT_DIR/additional/Brewfile Brewfile
brew bundle
#copy package for firebase
cp $CURRENT_DIR/sources/package.json package.json
#yarn
yarn install
# copy setup, install and update commands
cp $CURRENT_DIR/sources/setup.command setup.command
cp $CURRENT_DIR/sources/install_dependencies.command install_dependencies.command
cp $CURRENT_DIR/sources/update_dependencies.command update_dependencies.command
# commit
git checkout -b feature/setup_project
git add .
git commit -m "Setup project configuration"
# open workspace
open -a Xcode $PROJECT_NAME.xcworkspace
open $PROJECT_NAME.xcworkspace

View File

@ -1,12 +1,9 @@
Analytics
Appearance
Cells
Controllers
Extensions
Generated
Models
Networking
Protocols
Resources/Localization
Realm
Views

View File

@ -0,0 +1,16 @@
# Project path
readonly PROJECT_PATH=${1}
xcodebuild \
-quiet \
-scheme CodeGen \
-project ${PROJECT_PATH} \
-destination 'generic/platform=macOS' \
archive
if test $? -eq 0
then echo "Code generation was finished successfully!"
else
echo "There is the error with code generation!"
exit 1
fi

View File

@ -0,0 +1,16 @@
# Project path
readonly PROJECT_PATH=${1}
xcodebuild \
-quiet \
-scheme CodeLint \
-project ${PROJECT_PATH} \
-destination 'generic/platform=macOS' \
analyze
if test $? -eq 0
then echo "Code linting was finished successfully!"
else
echo "There is the error with code linting!"
exit 1
fi

View File

@ -1,3 +1,3 @@
tap "yonaskolb/XcodeGen", "https://github.com/yonaskolb/XcodeGen.git"
brew "XcodeGen"
brew "carthage"

View File

@ -1,3 +1,9 @@
source 'https://rubygems.org'
gem 'mustache'
gem 'generamba'
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/strongself/Generamba.git" }
gem "cocoapods"
gem "fastlane"
gem 'generamba', github: 'strongself/develop'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

View File

@ -1,53 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.6)
activesupport (5.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
claide (1.0.2)
cocoapods-core (1.0.1)
activesupport (>= 4.0.2)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
colored (1.2)
concurrent-ruby (1.0.5)
fuzzy_match (2.0.4)
generamba (1.4.1)
cocoapods-core (= 1.0.1)
git (= 1.2.9.1)
liquid (= 4.0.0)
terminal-table (= 1.4.5)
thor (= 0.19.1)
xcodeproj (= 1.4.2)
git (1.2.9.1)
i18n (1.0.0)
concurrent-ruby (~> 1.0)
liquid (4.0.0)
minitest (5.11.3)
mustache (1.0.5)
nanaimo (0.2.4)
nap (1.1.0)
terminal-table (1.4.5)
thor (0.19.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.4.2)
CFPropertyList (~> 2.3.3)
activesupport (>= 3)
claide (>= 1.0.1, < 2.0)
colored (~> 1.2)
nanaimo (~> 0.2.3)
PLATFORMS
ruby
DEPENDENCIES
generamba
mustache
BUNDLED WITH
1.16.1

View File

@ -0,0 +1,8 @@
diff "${SRCROOT}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"

View File

@ -0,0 +1,6 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!
gem 'fastlane-plugin-firebase_app_distribution'
gem 'fastlane-plugin-badge'

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
bundle exec pod install

5
sources/package.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"firebase-tools": "^7.12.1"
}
}

View File

@ -1,6 +1,4 @@
import UIKit
import Fabric
import Crashlytics
@UIApplicationMain
final class AppDelegate: UIResponder, UIApplicationDelegate {
@ -28,7 +26,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Fabric.with([Crashlytics.self])
FirebaseConfigurator.configure()
return true
}
}

View File

@ -0,0 +1,13 @@
extension String {
static let newLine = "\n"
static let empty = ""
static let whiteSpace = " "
static let dot = "."
static let comma = ","
static let zero = "0"
}

View File

@ -0,0 +1,31 @@
import Firebase
enum FirebaseConfigurator {
private static var resourceName: String {
#if APPSTORE
return "AppStore-GoogleService-Info"
#elseif ENTERPRISE
return "Enterprise-GoogleService-Info"
#elseif STANDARD
return "Standard-GoogleService-Info"
#else
assertionFailure("There is no right plist file")
return .empty
#endif
}
static func configure() {
guard let filePath = Bundle.main.path(forResource: resourceName, ofType: .fileExtension),
let options = FirebaseOptions(contentsOfFile: filePath) else {
return
}
FirebaseApp.configure(options: options)
}
}
// MARK: - Constants
private extension String {
static let fileExtension = "plist"
}

View File

@ -1,6 +1,6 @@
import UIKit
struct NavigationService {
enum NavigationService {
static var appWindow: UIWindow {
return AppDelegate.shared.appWindow
}

20
sources/setup.command Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
# Устанавливаем необходимые пакеты через Homebrew
brew bundle
# Устанавливаем bundler
gem install bundler
# Устанавливаем ruby зависимости.
# Cocoapods and Fastlane
bundle install
# Обновляем репозиторий подов и запускаем их установку.
bundle exec pod install --repo-update
# Configure githooks folder path
git config --local core.hooksPath .githooks

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
bundle exec pod update

View File

@ -1,14 +0,0 @@
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKitAdditions/LeadKitAdditions.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxKeyboard/RxKeyboard.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxOptional/RxOptional.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/PinLayout/PinLayout.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json"
github "ReactiveX/RxSwift"
github "maxsokolov/TableKit"
github "pronebird/UIScrollView-InfiniteScroll"

View File

@ -20,24 +20,12 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>API_KEY_FROM_FABRIC</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>

View File

@ -1,5 +1,5 @@
source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/TouchInstinct/Podspecs.git'
source 'https://cdn.cocoapods.org/'
source 'git@github.com:TouchInstinct/Podspecs'
platform :ios, '{{deployment_target}}'
@ -7,16 +7,53 @@ use_frameworks!
inhibit_all_warnings!
project '{{project_name}}', {
'StandardDebug' => :debug,
'EnterpriseDebug' => :debug,
'StandardRelease' => :release,
'EnterpriseRelease' => :release
'AppStore' => :release,
'Release' => :release,
'Debug' => :debug
}
target '{{project_name}}' do
pod 'Fabric'
pod 'Crashlytics'
pod 'SwiftLint'
# System
pod 'SwiftLint', '0.42.0'
pod 'LicensePlist'
pod 'Firebase/Crashlytics'
pod 'Firebase/Performance'
pod 'Firebase/Analytics' # for Firebase/Performance
# Rx
pod 'RxKeyboard', '1.0.0'
# Security
pod 'KeychainAccess'
# Utils
pod 'LeadKit'
pod 'DeviceKit'
# Layout
pod 'SnapKit'
# UI
pod 'TableKit'
end
# fixes Xcode 12 warnings:
# "The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99."
# see https://github.com/CocoaPods/CocoaPods/issues/9884
min_supported_deployment_target = Version.new(9.0) # as of Xcode 12
post_install do |pi|
pi.pods_project.targets.each do |target|
target.build_configurations.each do |config|
build_config_version = Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
max_deployment_target = [build_config_version, min_supported_deployment_target].max
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = max_deployment_target.to_s
end
end
end
# If you have slow HDD

View File

@ -24,7 +24,8 @@ catalogs:
### Templates
templates:
- {name: touchin}
- {name: touchin-configurable}
- {name: touchin-custom-view}
- {name: touchin-stateful}
- {name: touchin-pagination}
- {name: touchin-tablecell}

View File

@ -0,0 +1 @@
${SRCROOT}/{{project_name}}

View File

@ -0,0 +1,2 @@
git_url "{{git_url}}"
ENV["MATCH_PASSWORD"] = "{{match_password}}"

View File

@ -0,0 +1,24 @@
targets:
{{project_name}}:
development:
PROVISIONING_PROFILE_SPECIFIER: "match Development ru.touchin.{{project_name_lowecased}}"
PRODUCT_BUNDLE_IDENTIFIER: "ru.touchin.{{project_name_lowecased}}"
enterprise:
PROVISIONING_PROFILE_SPECIFIER: "match InHouse com.touchin.{{project_name_lowecased}}"
PRODUCT_BUNDLE_IDENTIFIER: "com.touchin.{{project_name_lowecased}}"
appstore:
PROVISIONING_PROFILE_SPECIFIER: "***"
PRODUCT_BUNDLE_IDENTIFIER: "***"
types:
development:
apple_id: "apple@touchin.ru"
team_id: "D4HA43V467"
itc_team_id: "1426360"
enterprise:
apple_id: "enterpriseapple@touchin.ru"
team_id: "228J5MMU7S"
appstore:
apple_id: "apple@touchin.ru"
team_id: "***"
itc_team_id: "***"

View File

@ -0,0 +1,3 @@
echo "Running post-merge hook"
sh .githooks/scripts/CodeGen.sh './{{project_name}}.xcodeproj'

View File

@ -0,0 +1,3 @@
echo "Running post-merge hook"
sh .githooks/scripts/CodeLint.sh './{{project_name}}.xcodeproj'

View File

@ -2,11 +2,17 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
## User settings
xcuserdata/
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
## Various settings
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
@ -15,15 +21,11 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
## App packaging
*.ipa
*.dSYM.zip
*.dSYM
@ -37,6 +39,13 @@ playground.xcworkspace
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm
.build/
# CocoaPods
@ -46,29 +55,51 @@ playground.xcworkspace
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
Carthage/Checkouts
Carthage/Build
Carthage/Build/
# Accio dependency management
Dependencies/
.accio/
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/screenshots/**/*.png
fastlane/test_output
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/
# homebrew-bundle
Brewfile.lock.json
# Node.js
# Dependency directories
node_modules/
# Touch Instinct custom
Downloads/
fastlane/README.md
Templates/
cpd-output.xml
*.swp
*IDEWorkspaceChecks.plist

View File

@ -1,46 +1,40 @@
name: {{project_name}}
options:
createIntermediateGroups: true
xcodeVersion: 10.0
xcodeVersion: 11.0
usesTabs: false
indentWidth: 4
deploymentTarget:
iOS: "{{deployment_target}}"
configs:
StandardDebug: debug
StandardRelease: release
EnterpriseDebug: debug
EnterpriseRelease: release
AppStore: release
Release: release
Debug: debug
targets:
{{project_name}}:
settings:
base:
SWIFT_VERSION: 4.2
SWIFT_VERSION: 5.0
SWIFT_SWIFT3_OBJC_INFERENCE: On
CODE_SIGN_STYLE: Manual
configs:
StandardDebug:
Debug:
PRODUCT_BUNDLE_IDENTIFIER: ru.touchin.{{project_name_lowecased}}
StandardRelease:
PRODUCT_BUNDLE_IDENTIFIER: ru.touchin.{{project_name_lowecased}}
EnterpriseDebug:
GOOGLE_SERVICE_INFO_PLIST_PATH: $(SRCROOT)/$(TARGET_NAME)/Resources/Standard-GoogleService-Info.plist
Release:
PRODUCT_BUNDLE_IDENTIFIER: com.touchin.{{project_name_lowecased}}
EnterpriseRelease:
GOOGLE_SERVICE_INFO_PLIST_PATH: $(SRCROOT)/$(TARGET_NAME)/Resources/Enterprise-GoogleService-Info.plist
AppStore:
PRODUCT_BUNDLE_IDENTIFIER: com.touchin.{{project_name_lowecased}}
GOOGLE_SERVICE_INFO_PLIST_PATH: $(SRCROOT)/$(TARGET_NAME)/Resources/AppStore-GoogleService-Info.plist
type: application
platform: iOS
prebuildScripts:
- script: ". build-scripts/xcode/build_phases/localization.sh"
name: Localization
- script: ". build-scripts/xcode/build_phases/api_generator.sh 1.1.35"
name: API Generator
postbuildScripts:
- script: ". build-scripts/xcode/build_phases/swiftlint.sh"
name: Swiftlint
- script: ". build-scripts/xcode/build_phases/copy_paste_detection.sh"
name: CopyPaste Detection
- script: "\"${PODS_ROOT}/Fabric/run\" API_KEY_FROM_FABRIC Build_Secret"
name: Fabric
- script: "\"${PODS_ROOT}/FirebaseCrashlytics/run\" --google-service-plist ${GOOGLE_SERVICE_INFO_PLIST_PATH}"
name: Firebase
runOnlyWhenInstalling: true
sources:
- path: {{project_name}}
@ -50,8 +44,6 @@ targets:
- "Info.plist"
- path: {{project_name}}/Analytics
buildPhase: sources
- path: {{project_name}}/Appearance
buildPhase: sources
- path: {{project_name}}/Cells
buildPhase: sources
- path: {{project_name}}/Controllers
@ -60,14 +52,10 @@ targets:
buildPhase: sources
- path: {{project_name}}/Generated
buildPhase: sources
- path: {{project_name}}/Models
buildPhase: sources
- path: {{project_name}}/Networking
buildPhase: sources
- path: {{project_name}}/Protocols
buildPhase: sources
- path: {{project_name}}/Realm
buildPhase: sources
- path: {{project_name}}/Resources
buildPhase: resources
- path: {{project_name}}/Resources/Localization
@ -76,3 +64,71 @@ targets:
buildPhase: sources
- path: {{project_name}}/Views
buildPhase: sources
aggregateTargets:
CodeGen:
buildScripts:
- name: Localization
script: |
readonly PRODUCT_NAME={{project_name}}
. build-scripts/xcode/build_phases/localization.sh
inputFiles:
- $(SRCROOT)/common/strings/default_common_strings_ru.json
- name: API Generator
script: . build-scripts/xcode/build_phases/api_generator.sh 1.4.0-alpha3 {{project_name}}/Generated
- name: License List
script: |
readonly PODS_ROOT="${SRCROOT}/Pods"
${PODS_ROOT}/LicensePlist/license-plist --output-path Resources/LicenseList --prefix Licenses --suppress-opening-directory
CodeLint:
buildScripts:
- name: Check Pods Manifest.lock
script: |
readonly PODS_ROOT="${SRCROOT}/Pods"
. ${SRCROOT}/build_phases/check_pods_manifest.sh
inputFiles:
- ${SRCROOT}/Podfile.lock
- ${PODS_ROOT}/Manifest.lock
outputFiles:
- $(DERIVED_FILE_DIR)/Pods-Ubrd-checkManifestLockResult.txt
- name: Swiftlint
script: |
readonly PODS_ROOT="${SRCROOT}/Pods"
readonly SCRIPT_DIR="${SRCROOT}/build-scripts/xcode/build_phases"
. ${SCRIPT_DIR}/swiftlint.sh
inputFileLists:
- $(SRCROOT)/build_phases/code_lint_folders.xcfilelist
basedOnDependencyAnalysis: false
- name: CopyPaste Detection
script: |
readonly SCRIPT_DIR="${SRCROOT}/build-scripts/xcode/build_phases"
. build-scripts/xcode/build_phases/copy_paste_detection.sh Localization Generated Pods
inputFileLists:
- $(SRCROOT)/build_phases/code_lint_folders.xcfilelist
basedOnDependencyAnalysis: false
UnusedDetection:
buildScripts:
- name: UnusedCode Detection
script: . build-scripts/xcode/build_phases/unused.sh
schemes:
CodeGen:
build:
targets:
CodeGen: [run, archive]
CodeLint:
build:
targets:
CodeLint: [analyze]
UnusedDetection:
build:
targets:
UnusedDetection: [analyze]