Skip to content

Commit

Permalink
Merge pull request #860 from teloxide/release-chores
Browse files Browse the repository at this point in the history
Simplify release process by using `cargo-release`
  • Loading branch information
WaffleLapkin committed Sep 24, 2023
2 parents f670a88 + e4f30e7 commit c7feb38
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ edition = "2021"
license = "MIT"
homepage = "https://github.com/teloxide/teloxide"
repository = "https://github.com/teloxide/teloxide"

[workspace.metadata.release]
tag-message = "Release {{crate_name}} version {{version}}"
tag-name = "{{prefix}}v{{version}}"
8 changes: 8 additions & 0 deletions crates/teloxide-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ rustdoc-args = ["--cfg", "docsrs", "-Znormalize-docs"]
# https://github.com/rust-lang/rust/issues/88791
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

[package.metadata.release]
tag-prefix = "core-"
enable-features = ["full"]
pre-release-replacements = [
{file="README.md", search="teloxide-core = \"[^\"]+\"", replace="teloxide-core = \"{{version}}\""},
{file="src/lib.rs", search="teloxide-core = \"[^\"]+\"", replace="teloxide-core = \"{{version}}\""},
{file="CHANGELOG.md", search="## unreleased", replace="## unreleased\n\n## {{version}} - {{date}}", exactly=1},
]

[[example]]
name = "self_info"
Expand Down
2 changes: 1 addition & 1 deletion crates/teloxide-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! asynchronous and built using [`tokio`].
//!
//!```toml
//! teloxide_core = "0.9"
//! teloxide-core = "0.9"
//! ```
//! _Compiler support: requires rustc 1.65+_.
//!
Expand Down
8 changes: 6 additions & 2 deletions crates/teloxide-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ documentation = "https://docs.rs/teloxide-core/"
# FIXME: add a simple readme for teloxide-macros
#readme = "README.md"


[lib]
proc-macro = true


[dependencies]
quote = "1.0.7"
proc-macro2 = "1.0.19"
syn = { version = "1.0.13", features = ["full"] }
heck = "0.4.0"

[package.metadata.release]
tag-prefix = "macros-"
pre-release-replacements = [
{file="CHANGELOG.md", search="## unreleased", replace="## unreleased\n\n## {{version}} - {{date}}", exactly=1},
]
7 changes: 7 additions & 0 deletions crates/teloxide/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "dep_docsrs"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

[package.metadata.release]
tag-prefix = ""
enable-features = ["full"]
pre-release-replacements = [
{file="../../README.md", search="teloxide = \\{ version = \"[^\"]+\"", replace="teloxide = { version = \"{{version}}\""},
{file="../../CHANGELOG.md", search="## unreleased", replace="## unreleased\n\n## {{version}} - {{date}}", exactly=1},
]

[[test]]
name = "redis"
Expand Down

0 comments on commit c7feb38

Please sign in to comment.