Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ jobs:
with:
xcode-version: ${{ env.xcode_version }}

# storeframe frames the captures; it is the one thing the scripts here
# want that is not in the standard library
# storeframe frames the captures and sampledoc writes the samples, the two
# things the scripts here want that are not in the standard library
- uses: actions/setup-python@v7
with:
python-version: "3.13"
Expand All @@ -220,7 +220,7 @@ jobs:
uses: actions/cache@v6
with:
path: build/screenshots
key: screenshots-${{ matrix.device }}-${{ runner.os }}-${{ env.xcode_version }}-${{ hashFiles('OpenDocumentReader.xcodeproj/project.pbxproj', 'OpenDocumentReader.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'OpenDocumentReader/**', 'OpenDocumentReaderUITests/**', 'Ads/**', 'NoAds/**', 'configs/**', 'scripts/make-screenshot-documents.py') }}
key: screenshots-${{ matrix.device }}-${{ runner.os }}-${{ env.xcode_version }}-${{ hashFiles('OpenDocumentReader.xcodeproj/project.pbxproj', 'OpenDocumentReader.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved', 'OpenDocumentReader/**', 'OpenDocumentReaderUITests/**', 'Ads/**', 'NoAds/**', 'configs/**', 'scripts/make-screenshot-documents.py', 'scripts/requirements.txt') }}

# half a set, so the lane does not check it - the job below does, once
# both halves are in
Expand Down
7 changes: 6 additions & 1 deletion OpenDocumentReader/ScreenshotMode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,16 @@ enum ScreenshotMode {
let search: String
}

/// The file's top level; it also carries the store locale table, which the app does not need.
private struct Names: Decodable {
let languages: [String: Details]
}

private static func details() -> Details? {
guard
let url = Bundle.main.url(forResource: "screenshot-names", withExtension: "json"),
let data = try? Data(contentsOf: url),
let all = try? JSONDecoder().decode([String: Details].self, from: data)
let all = try? JSONDecoder().decode(Names.self, from: data).languages
else {
assertionFailure("no screenshot-names.json bundled - run scripts/make-screenshot-documents.py")

Expand Down
4 changes: 3 additions & 1 deletion fastlane/screenshots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ capture run writes the raw pictures to this directory and the framed set to
are taken during the release run, from the build that goes out.

```sh
python3 -m pip install -r scripts/requirements.txt # storeframe and sampledoc
bundle exec fastlane ios screenshots # capture, then frame
python3 -m storeframe frame fastlane/frames/frames.json --platform ios \
--captured fastlane/screenshots --out fastlane/framed # frame again, without a capture
Expand All @@ -14,7 +15,8 @@ python3 -m storeframe frame fastlane/frames/frames.json --platform ios \
The lane does these steps:

1. `scripts/make-screenshot-documents.py` writes the localized sample
documents. They are build output and go into Debug builds only.
documents with [sampledoc](https://github.com/opendocument-app/sampledoc).
They are build output and go into Debug builds only.
2. `fastlane snapshot` builds the `ODR Screenshots` scheme once and launches
the app once per screen and locale, with `-ODRScreenshot <screen>`. See
`OpenDocumentReader/ScreenshotMode.swift`.
Expand Down
Loading
Loading