Skip to content

Commit cd0742d

Browse files
ikuninclaude
andcommitted
Say "1 app" rather than "1 apps" when the index has one
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BHqBkVbnKPqL7qKAQethGK
1 parent 8e3e459 commit cd0742d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

publish.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,18 @@ def main():
103103
if problems:
104104
sys.exit(f"the index has {len(problems)} problems, not publishing")
105105
listed = ", ".join(slug for slug, _ in apps)
106+
count = f"{len(apps)} app" + ("" if len(apps) == 1 else "s")
106107
what = f"Publish {args.app}: {len(pages)} pages" if args.app \
107-
else f"Rebuild the index: {len(apps)} apps"
108+
else f"Rebuild the index: {count}"
108109

109110
run("git", "add", "-A", cwd=checkout)
110111
status = run("git", "status", "--short", cwd=checkout).stdout.strip()
111112
if not status:
112113
print(f"{args.app or 'index'}: already published, nothing changed")
113114
return
114-
print(f"index: {len(apps)} apps{listed}")
115+
print(f"index: {count}{listed}")
115116
if args.dry_run:
116-
print(f"would commit {what.lower()}\n{status[:600]}")
117+
print(f"would commit: {what}\n{status[:600]}")
117118
return
118119

119120
run("git", "-c", "user.email=kunin.igor@gmail.com", "-c", "user.name=ikunin",

0 commit comments

Comments
 (0)