Skip to content

Commit a2a6a35

Browse files
authored
Merge pull request #2090 from CosmWasm/aw/cargo-release
Set `cargo-release` up
2 parents cbfd497 + a05368b commit a2a6a35

File tree

7 files changed

+34
-64
lines changed

7 files changed

+34
-64
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to
55
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
<!-- next-header -->
8+
79
## [Unreleased]
810

911
### Added
@@ -800,6 +802,8 @@ and this project adheres to
800802
The CHANGELOG for versions before 1.0.0 was moved to
801803
[CHANGELOG-pre1.0.0.md](./CHANGELOG-pre1.0.0.md).
802804

805+
<!-- next-url -->
806+
803807
[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v2.0.1...HEAD
804808
[2.0.1]: https://github.com/CosmWasm/cosmwasm/compare/v2.0.0...v2.0.1
805809
[2.0.0]: https://github.com/CosmWasm/cosmwasm/compare/v1.5.0...v2.0.0

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ version = "2.0.1"
1212
[workspace.dependencies]
1313
schemars = "0.8.4"
1414
serde = { version = "1.0.192", default-features = false, features = ["derive", "alloc"] }
15+
16+
[workspace.metadata.release]
17+
shared-version = true
18+
tag-message = "chore: Release cosmwasm v{{version}}"
19+
tag-name = "v{{version}}"

devtools/release_checks.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
# Move to the workspace root
4+
WORKSPACE_PATH=$(dirname $(cargo locate-project --workspace --message-format=plain))
5+
cd $WORKSPACE_PATH
6+
7+
cargo build
8+
9+
for contract_dir in contracts/*/; do
10+
(cd "$contract_dir" && cargo build)
11+
done

devtools/set_version.sh

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/core/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/core"
77
license = "Apache-2.0"
88
readme = "README.md"
99

10-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10+
[package.metadata.release]
11+
release = false
1112

1213
[dependencies]

packages/go-gen/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ version = "0.1.0"
55
edition = "2021"
66
publish = false
77

8-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
9-
108
[dependencies]
119
cosmwasm-std = { version = "2.0.1", path = "../std", features = ["cosmwasm_2_0", "staking", "stargate"] }
1210
cosmwasm-schema = { version = "2.0.1", path = "../schema" }

packages/vm/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ description = "VM bindings to run cosmwams contracts"
77
repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/vm"
88
license = "Apache-2.0"
99

10+
[package.metadata.release]
11+
pre-release-hook = [
12+
"../../devtools/release_checks.sh"
13+
]
14+
pre-release-replacements = [
15+
{ file="../../CHANGELOG.md", search="## \\[Unreleased\\]", replace="## [{{version}}] - {{date}}", exactly=1 },
16+
{ file="../../CHANGELOG.md", search="(U|u)nreleased", replace="{{version}}" },
17+
{ file="../../CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n\n## [Unreleased]", exactly=1 },
18+
{ file="../../CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1 },
19+
{ file="../../CHANGELOG.md", search="<!-- next-url -->\n", replace="<!-- next-url -->\n\n[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/{{tag_name}}...HEAD", exactly=1 },
20+
]
21+
1022
[features]
1123
default = ["staking", "iterator"]
1224
# iterator allows us to iterate over all DB items in a given range

0 commit comments

Comments
 (0)