Skip to content

Commit 5b49618

Browse files
committed
Обновил скриншоты, fastfile и makefile
1 parent 87d65b3 commit 5b49618

29 files changed

+89
-11
lines changed

Makefile

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
# Цвета и шрифт
44
YELLOW=\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 для генерации скриншотов приложения
249257
screenshots:
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)"

fastlane/Appfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
app_identifier("com.oleg991.SwiftUI-Days") # The bundle identifier of your app
2+
itc_team_id("127738690") # Team ID for "Oleg Eremenko"
23
# apple_id("[[APPLE_ID]]") # Your Apple Developer Portal username
34

45

fastlane/Fastfile

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,36 @@ update_fastlane
1616
default_platform(:ios)
1717

1818
platform :ios do
19-
desc "Generate new localized screenshots"
19+
desc "Сгенерировать новые локализованные скриншоты"
2020
lane :screenshots do
2121
capture_screenshots(scheme: "SwiftUI-DaysUITests")
2222
end
2323

24+
desc "Загрузить существующие скриншоты в App Store Connect"
25+
lane :upload_screenshots_only do
26+
upload_to_app_store(
27+
skip_metadata: true,
28+
skip_screenshots: false,
29+
force: true,
30+
submit_for_review: false,
31+
reject_if_possible: false,
32+
screenshots_path: "./fastlane/screenshots"
33+
)
34+
end
35+
36+
desc "Сгенерировать скриншоты и загрузить в App Store Connect"
37+
lane :screenshots_and_upload do
38+
screenshots
39+
upload_to_app_store(
40+
skip_metadata: true,
41+
skip_screenshots: false,
42+
force: true,
43+
submit_for_review: false,
44+
reject_if_possible: false,
45+
screenshots_path: "./fastlane/screenshots"
46+
)
47+
end
48+
2449
desc "Собрать и отправить сборку в TestFlight"
2550
lane :release do
2651
build_app(

fastlane/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,23 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
2121
[bundle exec] fastlane ios screenshots
2222
```
2323

24-
Generate new localized screenshots
24+
Сгенерировать новые локализованные скриншоты
25+
26+
### ios upload_screenshots_only
27+
28+
```sh
29+
[bundle exec] fastlane ios upload_screenshots_only
30+
```
31+
32+
Загрузить существующие скриншоты в App Store Connect
33+
34+
### ios screenshots_and_upload
35+
36+
```sh
37+
[bundle exec] fastlane ios screenshots_and_upload
38+
```
39+
40+
Сгенерировать скриншоты и загрузить в App Store Connect
2541

2642
### ios release
2743

fastlane/Snapfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A list of devices you want to take the screenshots from
2-
devices(["iPhone 16 Pro Max", "iPad Pro 13-inch (M4)"])
2+
devices(["iPhone 15 Pro Max", "iPad Pro (12.9-inch) (6th generation)"])
33

44
# A list of languages which should be used. See https://docs.fastlane.tools/actions/snapshot/#available-language-codes
55
languages(["en-US", "ru"])
@@ -30,3 +30,4 @@ clear_previous_screenshots(true)
3030

3131
skip_package_dependencies_resolution(true)
3232
disable_package_automatic_updates(true)
33+
output_simulator_logs(true)
232 KB
Loading
684 KB
Loading
341 KB
Loading
-234 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)