-
Notifications
You must be signed in to change notification settings - Fork 501
[MAINTAINER] Maintain version numbers with tbump #3616
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# 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.23.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}['\"]" | ||
|
||
|
||
# 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" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.