Skip to content

Commit cf5fba0

Browse files
authored
Use cargo-release to handle release automation (#82)
1 parent d15fe44 commit cf5fba0

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727
This should speed up build times and remove the dependency on `protoc` since we no longer need to compile proto definitions.
2828
- Bump tonic to 0.8.0 and remove tonic-build dependency.
2929
- Bump serde_with dependency to 2.0.0
30+
- Use cargo-release to automate release process
3031

3132
## [0.3.0] - 2022-04-14
3233

Diff for: README.md

+13
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ This SDK is still in development. The protocol between the Grafana server and th
1616

1717
The [grafana-sample-backend-plugin-rust][sample-plugin] repository contains a sample backend plugin with a backend written in Rust, along with a docker-compose setup with automatic plugin reloading.
1818

19+
## Developing
20+
21+
### Releasing
22+
23+
Releases are handled using [cargo-release][]. Run the following to dry-run release a new version of all crates:
24+
25+
```bash
26+
cargo release <major|minor|patch> --workspace
27+
```
28+
29+
If everything looks OK, add the `--execute` flag to go through with the release.
30+
1931
## License
2032

2133
The Rust SDK is licensed under either of the following, at your option:
@@ -24,6 +36,7 @@ The Rust SDK is licensed under either of the following, at your option:
2436
- MIT License (LICENSE-MIT or https://opensource.org/licenses/MIT)
2537

2638
[backend plugins]: https://grafana.com/docs/grafana/latest/developers/plugins/backend/
39+
[cargo-release]: https://crates.io/crates/cargo-release
2740
[go]: https://pkg.go.dev/github.com/grafana/grafana-plugin-sdk-go
2841
[grafana-rs-datasource]: https://github.com/toddtreece/grafana-rs-datasource
2942
[sample-plugin]: https://github.com/sd2k/grafana-sample-backend-plugin-rust/

Diff for: crates/grafana-plugin-sdk-macros/release.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tag-prefix = "grafana-plugin-sdk-macros-"

Diff for: crates/grafana-plugin-sdk/release.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pre-release-replacements = [
2+
{file="../../CHANGELOG.md", search="Unreleased", replace="{{version}}"},
3+
{file="../../CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
4+
{file="../../CHANGELOG.md", search="ReleaseDate", replace="{{date}}"},
5+
{file="../../CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n\n## [Unreleased] - ReleaseDate", exactly=1},
6+
{file="../../CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/assert-rs/predicates-rs/compare/{{tag_name}}...HEAD", exactly=1},
7+
]

Diff for: release.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tag-prefix = ""
2+
sign-commit = true
3+
sign-tag = true

0 commit comments

Comments
 (0)