diff --git a/README.md b/README.md index f94e3c3..3aa5572 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,7 @@ - Создать организацию в Фабрике и создать группу тестировщиков `touch-instinct` -### Шаг 2. Установка *Инструментов* - -- Поставить *Xcodegen*???. Легче всего это можно сделать через [Homebrew](https://github.com/yonaskolb/XcodeGen#homebrew). Остальные способы можно прочитать там же на странице. -- Поставить *mustache*. `sudo gem install mustache` - -### Шаг 3. Запуск скрипта развертки проекта +### Шаг 2. Запуск скрипта развертки проекта Очень важно **НЕ ПЕРЕПУТАТЬ!!!** порядок параметров. @@ -30,11 +25,60 @@ - ПАРАМЕТР_1 = Родительская папка для расположения проекта, в ней будет создана папка проекта. - ПАРАМЕТР_2 = Имя проекта. Папка проекта будет создана с постфиксом `-ios`. -> Пример: если ПАРАМЕТР_2 называется `Bank`, то папка проекта будет называться `Bank-ios`. Уже внутри папки проекта уже будут находится файлы `*.xcodeproj`, `*.xcodeworkspace`, `Podfile`, `Rambafile`, ... +> Пример: если ПАРАМЕТР_2 называется `Bank`, то папка проекта будет называться `Bank-ios`. Уже внутри папки проекта уже будут находится остальные файлы. Пример -- ПАРАМЕТР_3 = Название репозитория с общими строками, без указания расширения гит и названия компании. Пример: `Bank-Common`, `Bank2-Common` +```sh +├── Bank +│   ├── Analytics +│   ├── AppDelegate.swift +│   ├── Cells +│   ├── Controllers +│   ├── Extensions +│   ├── Generated +│   │   └── models.swift +│   ├── Info.plist +│   ├── Models +│   ├── Networking +│   ├── Protocols +│   ├── Realm +│   ├── Resources +│   │   ├── Assets.xcassets +│   │   │   └── AppIcon.appiconset +│   │   │   └── Contents.json +│   │   ├── LaunchScreen.storyboard +│   │   └── Localization +│   │   ├── Base.lproj +│   │   │   └── Localizable.strings +│   │   ├── String+Localization.swift +│   │   └── ru.lproj +│   │   └── Localizable.strings +│   ├── Services +│   └── Views +├── Bank.xcodeproj +├── Bank.xcworkspace +├── Downloads +├── Podfile +├── Podfile.lock +├── Pods +├── README.md +├── Rambafile +├── build-scripts +├── common +├── cpd-output.xml +└── fastlane + └── Fastfile -### Шаг 4. После установки: +93 directories, 138 files + +``` + +- ПАРАМЕТР_3 = Название репозитория с общими строками, без указания расширения `.git` и названия компании. Пример: `Bank-Common`, `Bank2-Common`. Пример скрипта + +```sh +igorkislyuk$ ./bootstrap.sh ~/Documents/projects/ Bank BankSpbJur-common +``` + +### Шаг 3. После установки: - поменять версию `*.xcodeproject` на Xcode-compatible 8.0 - **ВЫКЛЮЧИТЬ** автоматическое подписывание diff --git a/bootstrap.sh b/bootstrap.sh index 9da3a28..0254c38 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -71,7 +71,7 @@ echo "Generate xcodeproj file..." xcodegen --spec project.yml # creating .gitkeep in each folder to enforce git stash this folder -for folder in Analytics Cells Controllers Extensions Generated Models Networking Protocols Realm Resources/Localization Services Views; do +for folder in `cat $CURRENT_DIR/foldernames.txt`; do touch $PROJECT_NAME/$folder/.gitkeep done @@ -97,9 +97,9 @@ 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 +rm Gemfile* +rm Brewfile* +rm project.yml # commit git add . diff --git a/sources/Gemfile b/sources/Gemfile index 2a25f56..4b13bcd 100644 --- a/sources/Gemfile +++ b/sources/Gemfile @@ -1,2 +1,3 @@ source 'https://rubygems.org' -gem 'mustache' \ No newline at end of file +gem 'mustache' +gem 'generamba' \ No newline at end of file