Skip to content

Commit

Permalink
Setup cargo-release
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed May 8, 2024
1 parent c722153 commit a8f660d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 61 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- next-header -->

## [Unreleased]

## [1.5.4]
Expand Down Expand Up @@ -657,6 +659,8 @@ and this project adheres to
The CHANGELOG for versions before 1.0.0 was moved to
[CHANGELOG-pre1.0.0.md](./CHANGELOG-pre1.0.0.md).

<!-- next-url -->

[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/v1.5.4...HEAD
[1.5.4]: https://github.com/CosmWasm/cosmwasm/compare/v1.5.3...v1.5.4
[1.5.3]: https://github.com/CosmWasm/cosmwasm/compare/v1.5.2...v1.5.3
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ resolver = "2"
[workspace.package]
version = "1.5.4"

[workspace.metadata.release]
shared-version = true
tag-message = "chore: Release cosmwasm v{{version}}"
tag-name = "v{{version}}"
11 changes: 11 additions & 0 deletions devtools/release_checks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

# Move to the workspace root
WORKSPACE_PATH=$(dirname $(cargo locate-project --workspace --message-format=plain))
cd $WORKSPACE_PATH

cargo build

for contract_dir in contracts/*/; do
(cd "$contract_dir" && cargo build)
done
61 changes: 0 additions & 61 deletions devtools/set_version.sh

This file was deleted.

12 changes: 12 additions & 0 deletions packages/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ description = "VM bindings to run cosmwams contracts"
repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/vm"
license = "Apache-2.0"

[package.metadata.release]
pre-release-hook = [
"../../devtools/release_checks.sh"
]
pre-release-replacements = [
{ file="../../CHANGELOG.md", search="## \\[Unreleased\\]", replace="## [{{version}}] - {{date}}", exactly=1 },
{ file="../../CHANGELOG.md", search="(U|u)nreleased", replace="{{version}}" },
{ file="../../CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n\n## [Unreleased]", exactly=1 },
{ file="../../CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1 },
{ file="../../CHANGELOG.md", search="<!-- next-url -->\n", replace="<!-- next-url -->\n\n[unreleased]: https://github.com/CosmWasm/cosmwasm/compare/{{tag_name}}...HEAD", exactly=1 },
]

[features]
default = ["staking", "iterator"]
# backtraces provides much better context at runtime errors (in non-wasm code)
Expand Down

0 comments on commit a8f660d

Please sign in to comment.