Compare commits
1 Commits
master
...
feature/up
| Author | SHA1 | Date |
|---|---|---|
|
|
c64434026c |
13
bootstrap.sh
13
bootstrap.sh
|
|
@ -8,7 +8,7 @@ function generate {
|
|||
RESULT_PATH=$3
|
||||
|
||||
echo $PARAMS > data.yml
|
||||
mustache data.yml $TEMPLATE_PATH > $RESULT_PATH
|
||||
bundle exec mustache data.yml $TEMPLATE_PATH > $RESULT_PATH
|
||||
rm data.yml
|
||||
}
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ 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 DEPLOYMENT_TARGET="13.0"
|
||||
readonly CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
|
||||
readonly TEMPLATES=$CURRENT_DIR/templates
|
||||
readonly MATCH_PASSWORD=`pwgen 8 1`
|
||||
|
|
@ -60,7 +60,6 @@ done
|
|||
|
||||
# install required gems & brews
|
||||
cp $CURRENT_DIR/sources/Gemfile Gemfile
|
||||
cp $CURRENT_DIR/sources/Gemfile.lock Gemfile.lock
|
||||
cp $CURRENT_DIR/sources/Brewfile Brewfile
|
||||
|
||||
gem install bundler
|
||||
|
|
@ -138,7 +137,7 @@ generate "{project_name: $PROJECT_NAME}" $TEMPLATES/README.mustache README.md
|
|||
git submodule add git@github.com:TouchInstinct/$COMMON_REPO_NAME.git common
|
||||
git submodule add git@github.com:TouchInstinct/BuildScripts.git build-scripts
|
||||
|
||||
git submodule update --init
|
||||
git submodule update --init --recursive --remote
|
||||
|
||||
# final clean up
|
||||
rm project.yml
|
||||
|
|
@ -147,12 +146,6 @@ rm project.yml
|
|||
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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Analytics
|
|||
Cells
|
||||
Controllers
|
||||
Extensions
|
||||
Generated
|
||||
../Generated
|
||||
Networking
|
||||
Protocols
|
||||
Resources/Localization
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
tap "yonaskolb/XcodeGen", "https://github.com/yonaskolb/XcodeGen.git"
|
||||
|
||||
brew "XcodeGen"
|
||||
brew "imagemagick"
|
||||
brew "pmd"
|
||||
brew "xcodegen"
|
||||
brew "gettext"
|
||||
|
|
@ -4,6 +4,7 @@ git_source(:github) { |repo| "https://github.com/strongself/Generamba.git" }
|
|||
gem "cocoapods"
|
||||
gem "fastlane"
|
||||
gem 'generamba', github: 'strongself/develop'
|
||||
gem "mustache"
|
||||
|
||||
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
|
||||
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
# When you run Git from the command line, it runs in the environment as set up by your Shell.
|
||||
# GUI OS X apps, however, have no knowledge about your shell - and the PATH environment can be changed in many different places.
|
||||
# Export our profile with path by ourselves
|
||||
|
||||
function source_home_file {
|
||||
file="$HOME/$1"
|
||||
[[ -f "${file}" ]] && source "${file}"
|
||||
}
|
||||
|
||||
# Use specific exec due to Xcode has custom value of $PATH
|
||||
if [ -z "$(which pmd)" ]; then
|
||||
source_home_file ".bash_profile" || source_home_file ".zshrc" || true
|
||||
fi
|
||||
|
|
@ -4,3 +4,4 @@
|
|||
|
||||
gem 'fastlane-plugin-firebase_app_distribution'
|
||||
gem 'fastlane-plugin-badge'
|
||||
gem 'fastlane-plugin-xcodegen'
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"firebase-tools": "^7.12.1"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import UIKit
|
||||
import Firebase
|
||||
|
||||
@UIApplicationMain
|
||||
final class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
|
@ -26,7 +27,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
func application(_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
|
||||
FirebaseConfigurator.configure()
|
||||
FirebaseApp.configure()
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
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"
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
import UIKit
|
||||
|
||||
enum NavigationService {
|
||||
static var appWindow: UIWindow {
|
||||
return AppDelegate.shared.appWindow
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
source 'https://cdn.cocoapods.org/'
|
||||
source 'git@github.com:TouchInstinct/Podspecs'
|
||||
source 'https://github.com/TouchInstinct/Podspecs.git'
|
||||
|
||||
platform :ios, '{{deployment_target}}'
|
||||
|
||||
|
|
@ -21,22 +21,9 @@ target '{{project_name}}' do
|
|||
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:
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@ iOSInjectionProject/
|
|||
# homebrew-bundle
|
||||
Brewfile.lock.json
|
||||
|
||||
# Node.js
|
||||
# Ruby gems
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
*.gem
|
||||
|
||||
# Touch Instinct custom
|
||||
Downloads/
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ name: {{project_name}}
|
|||
|
||||
options:
|
||||
createIntermediateGroups: true
|
||||
xcodeVersion: 11.0
|
||||
xcodeVersion: 12.2
|
||||
usesTabs: false
|
||||
indentWidth: 4
|
||||
deploymentTarget:
|
||||
|
|
@ -13,8 +13,32 @@ configs:
|
|||
Release: release
|
||||
Debug: debug
|
||||
|
||||
packages:
|
||||
TICoordinatorKit:
|
||||
url: https://github.com/TouchInstinct/TICoordinatorKit
|
||||
version: 1.1.6
|
||||
LeadKit:
|
||||
url: https://github.com/TouchInstinct/LeadKit
|
||||
version: 1.4.0
|
||||
SnapKit:
|
||||
url: https://github.com/SnapKit/SnapKit
|
||||
version: 5.0.1
|
||||
|
||||
targets:
|
||||
{{project_name}}:
|
||||
dependencies:
|
||||
- package: LeadKit
|
||||
product: TISwiftUtils
|
||||
- package: LeadKit
|
||||
product: TIFoundationUtils
|
||||
- package: LeadKit
|
||||
product: TIKeychainUtils
|
||||
- package: LeadKit
|
||||
product: TIUIKitCore
|
||||
- package: LeadKit
|
||||
product: TIUIElements
|
||||
- package: LeadKit
|
||||
product: TITableKitUtils
|
||||
settings:
|
||||
base:
|
||||
SWIFT_VERSION: 5.0
|
||||
|
|
@ -32,10 +56,6 @@ targets:
|
|||
GOOGLE_SERVICE_INFO_PLIST_PATH: $(SRCROOT)/$(TARGET_NAME)/Resources/AppStore-GoogleService-Info.plist
|
||||
type: application
|
||||
platform: iOS
|
||||
postbuildScripts:
|
||||
- script: "\"${PODS_ROOT}/FirebaseCrashlytics/run\" --google-service-plist ${GOOGLE_SERVICE_INFO_PLIST_PATH}"
|
||||
name: Firebase
|
||||
runOnlyWhenInstalling: true
|
||||
sources:
|
||||
- path: {{project_name}}
|
||||
excludes:
|
||||
|
|
@ -50,7 +70,7 @@ targets:
|
|||
buildPhase: sources
|
||||
- path: {{project_name}}/Extensions
|
||||
buildPhase: sources
|
||||
- path: {{project_name}}/Generated
|
||||
- path: Generated
|
||||
buildPhase: sources
|
||||
- path: {{project_name}}/Networking
|
||||
buildPhase: sources
|
||||
|
|
@ -70,13 +90,13 @@ aggregateTargets:
|
|||
buildScripts:
|
||||
- name: Localization
|
||||
script: |
|
||||
readonly PRODUCT_NAME={{project_name}}
|
||||
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
|
||||
script: #. build-scripts/xcode/build_phases/api_generator.sh 1.4.0-alpha3 {{project_name}}/Generated
|
||||
|
||||
- name: License List
|
||||
script: |
|
||||
|
|
@ -90,10 +110,10 @@ aggregateTargets:
|
|||
readonly PODS_ROOT="${SRCROOT}/Pods"
|
||||
. ${SRCROOT}/build_phases/check_pods_manifest.sh
|
||||
inputFiles:
|
||||
- ${SRCROOT}/Podfile.lock
|
||||
- ${PODS_ROOT}/Manifest.lock
|
||||
- ${SRCROOT}/Podfile.lock
|
||||
- ${PODS_ROOT}/Manifest.lock
|
||||
outputFiles:
|
||||
- $(DERIVED_FILE_DIR)/Pods-Ubrd-checkManifestLockResult.txt
|
||||
- $(DERIVED_FILE_DIR)/Pods-Ubrd-checkManifestLockResult.txt
|
||||
|
||||
- name: Swiftlint
|
||||
script: |
|
||||
|
|
@ -101,16 +121,14 @@ aggregateTargets:
|
|||
readonly SCRIPT_DIR="${SRCROOT}/build-scripts/xcode/build_phases"
|
||||
. ${SCRIPT_DIR}/swiftlint.sh
|
||||
inputFileLists:
|
||||
- $(SRCROOT)/build_phases/code_lint_folders.xcfilelist
|
||||
basedOnDependencyAnalysis: false
|
||||
- $(SRCROOT)/build_phases/code_lint_folders.xcfilelist
|
||||
|
||||
- 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
|
||||
- $(SRCROOT)/build_phases/code_lint_folders.xcfilelist
|
||||
|
||||
UnusedDetection:
|
||||
buildScripts:
|
||||
|
|
@ -118,6 +136,11 @@ aggregateTargets:
|
|||
script: . build-scripts/xcode/build_phases/unused.sh
|
||||
|
||||
schemes:
|
||||
{{project_name}}:
|
||||
build:
|
||||
targets:
|
||||
{{project_name}}: all
|
||||
|
||||
CodeGen:
|
||||
build:
|
||||
targets:
|
||||
|
|
|
|||
Loading…
Reference in New Issue