Skip to content

Commit 9807879

Browse files
authored
Merge branch 'main' into copilot/fix-3610
2 parents a5ce117 + c3f3fcd commit 9807879

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

tbump.toml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# ===========================================================================
5+
# OpenTelemetry-cpp maintainer:
6+
#
7+
# RESOURCES:
8+
# https://github.com/your-tools/tbump
9+
# https://hackernoon.com/lets-automate-version-number-updates-not-a91q3x7n
10+
#
11+
# USAGE:
12+
# When making a new opentelemetry-cpp release:
13+
# tbump 1.23.0 --only-patch
14+
#
15+
# When making a new -dev version in the main branch:
16+
# tbump 1.24.0-dev --only-patch
17+
#
18+
# ===========================================================================
19+
20+
# Uncomment this if your project is hosted on GitHub:
21+
github_url = "https://github.com/open-telemetry/opentelemetry-cpp"
22+
23+
[version]
24+
current = "1.23.0-dev"
25+
26+
# Example of a semver regexp.
27+
# Make sure this matches current_version before
28+
# using tbump
29+
regex = '''
30+
(?P<major>\d+)
31+
\.
32+
(?P<minor>\d+)
33+
\.
34+
(?P<patch>\d+)
35+
((?P<dash>-)(?P<release>[a-z]+))?
36+
'''
37+
38+
[[field]]
39+
# the name of the field
40+
name = "release"
41+
# the default value to use, if there is no match
42+
default = ""
43+
44+
[[field]]
45+
# the name of the field
46+
name = "dash"
47+
# the default value to use, if there is no match
48+
default = ""
49+
50+
[git]
51+
message_template = "Bump to {new_version}"
52+
tag_template = "v{new_version}"
53+
54+
# For each file to patch, add a [[file]] config
55+
# section containing the path of the file, relative to the
56+
# tbump.toml location.
57+
58+
[[file]]
59+
src = "CMakeLists.txt"
60+
version_template = "{major}.{minor}.{patch}"
61+
search = "OPENTELEMETRY_VERSION_NUMBER \"{current_version}\""
62+
63+
[[file]]
64+
src = "CMakeLists.txt"
65+
# Longer template because release can be empty.
66+
version_template = "OPENTELEMETRY_VERSION_SUFFIX \"{dash}{release}\""
67+
search = "set[(]{current_version}[)]"
68+
69+
[[file]]
70+
src = "MODULE.bazel"
71+
search = "version = \"{current_version}\""
72+
73+
[[file]]
74+
src = "api/include/opentelemetry/version.h"
75+
search = "#define OPENTELEMETRY_VERSION \"{current_version}\""
76+
77+
[[file]]
78+
src = "api/include/opentelemetry/version.h"
79+
version_template = "{major}"
80+
search = "#define OPENTELEMETRY_VERSION_MAJOR {current_version}"
81+
82+
[[file]]
83+
src = "api/include/opentelemetry/version.h"
84+
version_template = "{minor}"
85+
search = "#define OPENTELEMETRY_VERSION_MINOR {current_version}"
86+
87+
[[file]]
88+
src = "api/include/opentelemetry/version.h"
89+
version_template = "{patch}"
90+
search = "#define OPENTELEMETRY_VERSION_PATCH {current_version}"
91+
92+
[[file]]
93+
src = "sdk/include/opentelemetry/sdk/version/version.h"
94+
search = "#define OPENTELEMETRY_SDK_VERSION \"{current_version}\""
95+
96+
[[file]]
97+
src = "sdk/src/version/version.cc"
98+
version_template = "{major}"
99+
search = "const int major_version\\s*=\\s*{current_version}"
100+
101+
[[file]]
102+
src = "sdk/src/version/version.cc"
103+
version_template = "{minor}"
104+
search = "const int minor_version\\s*=\\s*{current_version}"
105+
106+
[[file]]
107+
src = "sdk/src/version/version.cc"
108+
version_template = "{patch}"
109+
search = "const int patch_version\\s*=\\s*{current_version}"
110+
111+
[[file]]
112+
src = "sdk/src/version/version.cc"
113+
# Longer template because release can be empty.
114+
version_template = "= \"{release}\""
115+
search = "pre_release\\s*{current_version}"
116+
117+
[[file]]
118+
src = "sdk/src/version/version.cc"
119+
version_template = "{major}.{minor}.{patch}"
120+
search = "short_version\\s*= [\"]{current_version}[\"]"
121+
122+
[[file]]
123+
src = "sdk/src/version/version.cc"
124+
search = "full_version\\s*= ['\"]{current_version}['\"]"
125+
126+
127+
# You can specify a list of commands to
128+
# run after the files have been patched
129+
# and before the git commit is made
130+
131+
# [[before_commit]]
132+
# name = "check changelog"
133+
# cmd = "grep -q {new_version} Changelog.rst"
134+
135+
# Or run some commands after the git tag and the branch
136+
# have been pushed:
137+
# [[after_push]]
138+
# name = "publish"
139+
# cmd = "./publish.sh"

0 commit comments

Comments
 (0)