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
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ jobs:
# would be a shell injection
env:
given: ${{ inputs.version }}
run: .github/scripts/resolve-version.py --input "$given" --dry-run "$dry_run"
run: scripts/resolve-version.py --input "$given" --dry-run "$dry_run"

# this section becomes the release body, so a dry run checks it too
- name: check the changelog names this version
if: ${{ steps.version.outputs.version != '' }}
env:
version: ${{ steps.version.outputs.version }}
run: .github/scripts/changelog-section.py --version "$version"
run: scripts/changelog_section.py --version "$version"

# what the listing job uploads, so a missing translation fails here rather
# than once both apps are up
- name: check the store copy is written in every locale
if: ${{ steps.version.outputs.version != '' }}
env:
version: ${{ steps.version.outputs.version }}
run: scripts/store-listing.py --version "$version"
run: scripts/store_listing.py --version "$version"

- uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
id: version
env:
given: ${{ inputs.version }}
run: .github/scripts/resolve-version.py --input "$given" --dry-run "$dry_run"
run: scripts/resolve-version.py --input "$given" --dry-run "$dry_run"

# where the lane looks for them, and the same set both apps are given
- name: fetch the screenshots
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
id: version
env:
given: ${{ inputs.version }}
run: .github/scripts/resolve-version.py --input "$given" --dry-run "$dry_run"
run: scripts/resolve-version.py --input "$given" --dry-run "$dry_run"

- name: fetch the ipas
uses: actions/download-artifact@v8
Expand Down Expand Up @@ -375,7 +375,7 @@ jobs:
version: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
.github/scripts/changelog-section.py --version "$version" > "${RUNNER_TEMP}/notes.md"
scripts/changelog_section.py --version "$version" > "${RUNNER_TEMP}/notes.md"

# the version input is bare, the tag it publishes is prefixed
tag="v$version"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ heading.

The copy lives in `fastlane/metadata/<locale>/changelogs/1.41.txt`, one file per
version per locale, because App Store Connect keeps only the notes of the
submission in flight. `scripts/store-listing.py` checks it - the release run
submission in flight. `scripts/store_listing.py` checks it - the release run
refuses a version any locale is missing, before it builds anything - and stages
it into the shape `deliver` reads.

Expand Down Expand Up @@ -217,8 +217,8 @@ The build number is resolved once and given to both apps, so one `(version, buil
pair names one commit in both listings. App Store Connect only requires it to
increase, not to be contiguous, so whichever app was behind skips ahead.

`.github/scripts/resolve-version.py` decides which version a run builds and
refuses runs that cannot name one; `changelog-section.py` refuses a version with
`scripts/resolve-version.py` decides which version a run builds and
refuses runs that cannot name one; `scripts/changelog_section.py` refuses a version with
no `CHANGELOG.md` section, before anything is built, since that section becomes
the release body. Run either by hand to see what a dispatch would do.

Expand Down
4 changes: 2 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IPA_DIR = File.expand_path("../build").freeze

# Absolute for the same reason. They resolve the repository from their own path,
# so they do not care which of the two they are called from.
STORE_LISTING = File.expand_path("../scripts/store-listing.py").freeze
STORE_LISTING = File.expand_path("../scripts/store_listing.py").freeze
STORE_SCREENSHOTS = File.expand_path("../scripts/store_screenshots.py").freeze
FRAME_SCREENSHOTS = File.expand_path("../scripts/frame-screenshots.py").freeze
MAKE_DOCUMENTS = File.expand_path("../scripts/make-screenshot-documents.py").freeze
Expand Down Expand Up @@ -368,7 +368,7 @@ platform :ios do
#
# deliver uploads every metadata file it finds under metadata_path, so it is
# given a staged directory rather than fastlane/metadata itself, and
# store-listing.py names what goes into it. What is staged is what this
# store_listing.py names what goes into it. What is staged is what this
# repository says the store should say; anything else is left as App Store
# Connect has it.
#
Expand Down
8 changes: 4 additions & 4 deletions fastlane/metadata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ going out. What the store says is what is committed here.
Two things are left out of the upload on purpose. `review_information` is the
account's contact details and the note to the reviewer, and the category files
say where the app sits in the store - neither is release copy.
`scripts/store-listing.py` names what is staged, so adding a file to that list is
`scripts/store_listing.py` names what is staged, so adding a file to that list is
a decision rather than an accident.

## The two apps
Expand All @@ -34,7 +34,7 @@ line: Lite shows ads and Pro does not. Rather than keep two descriptions per
locale and let them drift, the shared one holds `${ads}` and each app fills it
in from its own `ads.txt` - Lite has one per locale, Pro has none, and a
fill-in nobody answers leaves nothing behind, the space in front of it
included. `FILL_INS` in `scripts/store-listing.py` lists the names one may
included. `FILL_INS` in `scripts/store_listing.py` lists the names one may
have, so a misspelt `${adds}` is an error rather than a sentence that quietly
vanishes from the store.

Expand All @@ -54,7 +54,7 @@ files are the history the store does not keep. The limit is 4000 characters per
locale.

`deliver` does not read this layout. It reads one `release_notes.txt` per
locale, so `scripts/store-listing.py` stages the version's file under that name
locale, so `scripts/store_listing.py` stages the version's file under that name
into a throwaway directory at upload time, with the rest of the listing beside
it.

Expand Down Expand Up @@ -83,7 +83,7 @@ anything.
## Name, subtitle, keywords

30 characters for the name, 30 for the subtitle, 100 for the keywords, counting
the commas. `scripts/store-listing.py` checks all three against what it stages
the commas. `scripts/store_listing.py` checks all three against what it stages
rather than against what is written here, since an app's own name is what
finally has to fit.

Expand Down
File renamed without changes.
File renamed without changes.
18 changes: 4 additions & 14 deletions scripts/store-copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,19 @@
# Unreleased while the heading is still open. A file that is already there is
# left alone and translated, since that is the copy that was reviewed.
#
# Nothing here uploads: `scripts/store-listing.py` checks and stages what this
# Nothing here uploads: `scripts/store_listing.py` checks and stages what this
# writes, and the release run uploads it.

import argparse
import concurrent.futures
import importlib.util
import subprocess
import sys
from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent


def load(path, name):
"""Import a sibling script, whose file name is not an identifier."""
spec = importlib.util.spec_from_file_location(name, path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
import changelog_section as changelog
import store_listing as listing


listing = load(ROOT / "scripts" / "store-listing.py", "store_listing")
changelog = load(ROOT / ".github" / "scripts" / "changelog-section.py", "changelog_section")
ROOT = Path(__file__).resolve().parent.parent

SOURCE = "en-US"

Expand Down
6 changes: 3 additions & 3 deletions scripts/store-listing.py → scripts/store_listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# staged directory rather than at fastlane/metadata itself, and what is copied
# in is named here rather than being whatever happens to be lying around.
#
# scripts/store-listing.py --version 1.41 check the notes
# scripts/store-listing.py --version 1.41 --stage DIR notes alone
# scripts/store-listing.py --version 1.41 --stage DIR --app pro the whole listing
# scripts/store_listing.py --version 1.41 check the notes
# scripts/store_listing.py --version 1.41 --stage DIR notes alone
# scripts/store_listing.py --version 1.41 --stage DIR --app pro the whole listing
#
# The two apps share one listing and differ in a few places, so what is staged
# is read in three passes - `fastlane/metadata/<locale>/`, then the app's own
Expand Down
3 changes: 0 additions & 3 deletions scripts/store_screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
# scripts/store_screenshots.py check what was captured
# scripts/store_screenshots.py --stage DIR check it and stage it
#
# Named with an underscore, unlike its neighbours, because frame-screenshots.py
# imports it and a hyphen is not an identifier.
#
# The store has eleven locales and the app is translated into nine of them.
# The other two get the English pictures, which is what their storefront would
# show anyway: the app has no UI in Hindi or Swedish either.
Expand Down