Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release tooling improvements #4554

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 1 addition & 2 deletions .github/workflows/legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ jobs:
strategy:
matrix:
coins: [universal, btconly]
# type: [normal, debuglink]
type: [debuglink]
type: [normal, debuglink]
env:
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
DEBUG_LINK: ${{ matrix.type == 'debuglink' && '1' || '0' }}
Expand Down
2 changes: 1 addition & 1 deletion core/.changelog.d/3324.fixed
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[T2B1, T3B1] Fix "PIN attempts exceeded" screen.
[T2B1,T3B1] Fix "PIN attempts exceeded" screen.
3 changes: 3 additions & 0 deletions tools/bump-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from pathlib import Path
import re
import subprocess

import click

Expand Down Expand Up @@ -78,6 +79,8 @@ def cli(project, version):
VERSION_MINOR=minor,
VERSION_PATCH=patch,
)
# also bump language JSONs
subprocess.run(["python", project / "translations" / "cli.py", "gen"])
elif parts[-1] == "legacy":
bump_header(
project / "firmware" / "version.h",
Expand Down
9 changes: 6 additions & 3 deletions tools/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def filter_line(line: str) -> str | None:


def _iter_fragments(project: Path) -> Iterator[Path]:
fragements_dir = project / ".changelog.d"
for fragment in fragements_dir.iterdir():
fragments_dir = project / ".changelog.d"
for fragment in fragments_dir.iterdir():
if fragment.name in IGNORED_FILES:
continue
yield fragment
Expand All @@ -150,10 +150,13 @@ def _iter_fragments(project: Path) -> Iterator[Path]:
def check_fragments_style(project: Path):
success = True
for fragment in _iter_fragments(project):
fragment_text = fragment.read_text().rstrip()
fragment_text = fragment.read_text().strip()
if not fragment_text.endswith("."):
click.echo(f"Changelog '{fragment}' must end with a period.")
success = False
if fragment_text.startswith("[") and not MODELS_RE.search(fragment_text):
click.echo(f"Wrong model specifier in '{fragment}'")
success = False

if not success:
raise click.ClickException(f"Changelog style error: {project}")
Expand Down
Loading