forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtbump.toml
More file actions
143 lines (116 loc) · 3.7 KB
/
tbump.toml
File metadata and controls
143 lines (116 loc) · 3.7 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# ===========================================================================
# OpenTelemetry-cpp maintainer:
#
# RESOURCES:
# https://github.com/your-tools/tbump
# https://hackernoon.com/lets-automate-version-number-updates-not-a91q3x7n
#
# USAGE:
# When making a new opentelemetry-cpp release:
# tbump 1.23.0 --only-patch
#
# When making a new -dev version in the main branch:
# tbump 1.24.0-dev --only-patch
#
# ===========================================================================
# Uncomment this if your project is hosted on GitHub:
github_url = "https://github.com/open-telemetry/opentelemetry-cpp"
[version]
current = "1.24.0-dev"
# Example of a semver regexp.
# Make sure this matches current_version before
# using tbump
regex = '''
(?P<major>\d+)
\.
(?P<minor>\d+)
\.
(?P<patch>\d+)
((?P<dash>-)(?P<release>[a-z]+))?
'''
[[field]]
# the name of the field
name = "release"
# the default value to use, if there is no match
default = ""
[[field]]
# the name of the field
name = "dash"
# the default value to use, if there is no match
default = ""
[git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"
# For each file to patch, add a [[file]] config
# section containing the path of the file, relative to the
# tbump.toml location.
[[file]]
src = "CMakeLists.txt"
version_template = "{major}.{minor}.{patch}"
search = "OPENTELEMETRY_VERSION_NUMBER \"{current_version}\""
[[file]]
src = "CMakeLists.txt"
# Longer template because release can be empty.
version_template = "OPENTELEMETRY_VERSION_SUFFIX \"{dash}{release}\""
search = "set[(]{current_version}[)]"
[[file]]
src = "MODULE.bazel"
search = "version = \"{current_version}\""
[[file]]
src = "api/include/opentelemetry/version.h"
search = "#define OPENTELEMETRY_VERSION \"{current_version}\""
[[file]]
src = "api/include/opentelemetry/version.h"
version_template = "{major}"
search = "#define OPENTELEMETRY_VERSION_MAJOR {current_version}"
[[file]]
src = "api/include/opentelemetry/version.h"
version_template = "{minor}"
search = "#define OPENTELEMETRY_VERSION_MINOR {current_version}"
[[file]]
src = "api/include/opentelemetry/version.h"
version_template = "{patch}"
search = "#define OPENTELEMETRY_VERSION_PATCH {current_version}"
[[file]]
src = "sdk/include/opentelemetry/sdk/version/version.h"
search = "#define OPENTELEMETRY_SDK_VERSION \"{current_version}\""
[[file]]
src = "sdk/src/version/version.cc"
version_template = "{major}"
search = "const int major_version\\s*=\\s*{current_version}"
[[file]]
src = "sdk/src/version/version.cc"
version_template = "{minor}"
search = "const int minor_version\\s*=\\s*{current_version}"
[[file]]
src = "sdk/src/version/version.cc"
version_template = "{patch}"
search = "const int patch_version\\s*=\\s*{current_version}"
[[file]]
src = "sdk/src/version/version.cc"
# Longer template because release can be empty.
version_template = "= \"{release}\""
search = "pre_release\\s*{current_version}"
[[file]]
src = "sdk/src/version/version.cc"
version_template = "{major}.{minor}.{patch}"
search = "short_version\\s*= [\"]{current_version}[\"]"
[[file]]
src = "sdk/src/version/version.cc"
search = "full_version\\s*= ['\"]{current_version}['\"]"
[[file]]
src = "functional/configuration/shelltests/kitchen-sink.test"
search = "telemetry.sdk.version: {current_version}"
# You can specify a list of commands to
# run after the files have been patched
# and before the git commit is made
# [[before_commit]]
# name = "check changelog"
# cmd = "grep -q {new_version} Changelog.rst"
# Or run some commands after the git tag and the branch
# have been pushed:
# [[after_push]]
# name = "publish"
# cmd = "./publish.sh"