Repository navigation
Expand file tree
/
Copy pathtbump.toml
More file actions
66 lines (55 loc) · 1.92 KB
/
Copy pathtbump.toml
File metadata and controls
66 lines (55 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[version]
current = "1.5.47"
# Updated regex to support X.Y.Z and X.Y.Z-rc1 (or -beta, -alpha)
regex = '''
(?P<major>\d+)
\.
(?P<minor>\d+)
\.
(?P<patch>\d+)
(?:-(?P<prerelease>[a-zA-Z0-9\.]+))?
'''
[git]
message_template = "chore(release): bump version to {new_version}"
tag_template = "v{new_version}"
# ---------------------------------------------------------
# Hooks: Run scripts automatically during the bump process
# ---------------------------------------------------------
# This runs after files are patched, but BEFORE the git commit is made.
# It uses git-cliff to write the Markdown changelog, then formats that
# into the RPM and Debian spec files automatically.
[[before_commit]]
name = "Generate Changelogs and Package Metadata"
cmd = "python3 scripts/build/update-package-metadata.py --version {new_version} --generate-changelog"
[[before_commit]]
name = "Generate Terminal Status Screenshot"
cmd = "python3 scripts/maintainer/generate-screenshot.py"
# Pre-run hooks to ensure everything is formatted before tbump tries to commit.
# This prevents failures where hooks modify files during the git commit step.
[[before_commit]]
name = "Pre-commit Formatting & Linting"
cmd = "pre-commit run --all-files || true"
# ---------------------------------------------------------
# Files to patch with the new version
# ---------------------------------------------------------
[[file]]
src = "Makefile"
search = "VERSION := {current_version}"
[[file]]
src = "src/flatpak_automatic/__init__.py"
search = "__version__ = \"{current_version}\""
[[file]]
src = "src/flatpak-automatic.py"
search = "# Version: {current_version}"
[[file]]
src = "src/flatpak_automatic/cli.py"
search = "v{current_version}"
[[file]]
src = "pyproject.toml"
search = "version = \"{current_version}\""
[[file]]
src = "config/sysconfig/flatpak-automatic"
search = "# Version: {current_version}"
[[file]]
src = "assets/banner.svg"
search = "v{current_version}"