1- .PHONY : help setup setup_hook setup_snapshot setup_fastlane update update_fastlane update_swiftformat format screenshots build test
1+ .PHONY : help setup setup_hook setup_snapshot setup_fastlane update update_fastlane update_swiftformat format screenshots build test testflight upload_screenshots
22
33# Цвета и шрифт
44YELLOW =\033[1;33m
@@ -245,6 +245,14 @@ format:
245245 @printf " $( YELLOW) Запуск swiftformat...$( RESET) \n"
246246 @swiftformat .
247247
248+ # # build: Сборка проекта в терминале
249+ build :
250+ xcodebuild -project SwiftUI-Days.xcodeproj -scheme SwiftUI-Days -sdk iphonesimulator -destination ' platform=iOS Simulator,name=iPhone 16 Pro' build
251+
252+ # # test: Запускает unit-тесты в терминале
253+ test :
254+ xcodebuild -project SwiftUI-Days.xcodeproj -scheme SwiftUI-Days -sdk iphonesimulator -destination ' platform=iOS Simulator,name=iPhone 16 Pro' test -testPlan SwiftUI-DaysTests
255+
248256# # screenshots: Запустить fastlane snapshot для генерации скриншотов приложения
249257screenshots :
250258 @bash -c ' \
@@ -262,14 +270,41 @@ screenshots:
262270 rbenv shell $(RUBY_VERSION ) ; \
263271 bundle exec fastlane snapshot; \
264272 '
273+ # # upload_screenshots: Загрузить существующие скриншоты в App Store Connect
274+ upload_screenshots :
275+ @bash -c ' \
276+ set -e; \
277+ if [ ! -d fastlane ] || [ ! -f fastlane/Fastfile ]; then \
278+ printf " $( YELLOW) fastlane не инициализирован в проекте$( RESET) \n" ; \
279+ $(MAKE ) setup_fastlane; \
280+ if [ ! -d fastlane ] || [ ! -f fastlane/Fastfile ]; then \
281+ printf " $( RED) Нужно инициализировать fastlane перед использованием$( RESET) \n" ; \
282+ exit 1; \
283+ fi ; \
284+ fi ; \
285+ printf " $( YELLOW) Загрузка существующих скриншотов в App Store Connect...$( RESET) \n" ; \
286+ eval " $$ (rbenv init -)" ; \
287+ rbenv shell $(RUBY_VERSION ) ; \
288+ bundle exec fastlane ios upload_screenshots_only; \
289+ '
265290
266- # # build: Сборка проекта в терминале
267- build :
268- xcodebuild -project SwiftUI-Days.xcodeproj -scheme SwiftUI-Days -sdk iphonesimulator -destination ' platform=iOS Simulator,name=iPhone 16 Pro' build
269-
270- # # test: Запускает unit-тесты в терминале
271- test :
272- xcodebuild -project SwiftUI-Days.xcodeproj -scheme SwiftUI-Days -sdk iphonesimulator -destination ' platform=iOS Simulator,name=iPhone 16 Pro' test -testPlan SwiftUI-DaysTests
291+ # # testflight: Собрать и отправить сборку в TestFlight через fastlane
292+ testflight :
293+ @bash -c ' \
294+ set -e; \
295+ if [ ! -d fastlane ] || [ ! -f fastlane/Fastfile ]; then \
296+ printf " $( YELLOW) fastlane не инициализирован в проекте$( RESET) \n" ; \
297+ $(MAKE ) setup_fastlane; \
298+ if [ ! -d fastlane ] || [ ! -f fastlane/Fastfile ]; then \
299+ printf " $( RED) Нужно инициализировать fastlane перед использованием$( RESET) \n" ; \
300+ exit 1; \
301+ fi ; \
302+ fi ; \
303+ printf " $( YELLOW) Запуск fastlane release для отправки в TestFlight...$( RESET) \n" ; \
304+ eval " $$ (rbenv init -)" ; \
305+ rbenv shell $(RUBY_VERSION ) ; \
306+ bundle exec fastlane ios release; \
307+ '
273308
274309.DEFAULT :
275310 @printf " $( RED) Неизвестная команда: 'make $@ '\n$( RESET) "
0 commit comments