From 07bc20b047f6f03d8125029ab866e01a3cbbbd66 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Mon, 2 Dec 2024 14:03:16 -0500 Subject: [PATCH] Preparing release of 0.10.2 --- CHANGELOG.md | 10 +++++++--- Cargo.toml | 13 ++++++++++--- RELEASE.md | 21 +++++++++++++++++++++ core/Cargo.toml | 12 ++++++------ core/src/block_view.rs | 11 ++++------- substreams-near/Cargo.toml | 6 +++--- substreams-near/src/lib.rs | 2 +- 7 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 RELEASE.md diff --git a/CHANGELOG.md b/CHANGELOG.md index f748a99..1a7923d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,15 @@ All notable changes to this project will be documented in this file. 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). -## [0.10.0](https://github.com/streamingfast/substreams-monitoring-smoke-test/releases/tag/v0.10.0) +## 0.10.2 -* Bumped dependencies to `substreams` to 0.6 and `prost` to 0.13 (see [Upgrade notes](https://github.com/streamingfast/substreams-rs/releases/tag/v0.6.0)) +* Re-release of `0.10.0` to jump over and 1 year old version that was incorrectly tagged as `v0.10.1` and is now causing dependency resolution problem with Prost update. -## [0.9.5](https://github.com/streamingfast/substreams-monitoring-smoke-test/releases/tag/v0.9.5) +## 0.10.0 + +* Bumped dependencies of `substreams` to 0.6 and `prost` to 0.13 (see [Upgrade notes](https://github.com/streamingfast/substreams-rs/releases/tag/v0.6.0)). + +## 0.9.5 ### Added diff --git a/Cargo.toml b/Cargo.toml index a673e38..9dfe6f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ opt-level = 's' strip = "debuginfo" [workspace.package] -version = "0.10.0" +version = "0.10.2" edition = "2021" description = "Substreams development kit for NEAR chains, contains Firehose Block model and helpers." homepage = "https://substreams.streamingfast.io/" @@ -20,5 +20,12 @@ categories = ["api-bindings", "external-ffi-bindings", "wasm"] rust-version = "1.71.1" [workspace.dependencies] -substreams-near = { version = "0.10.0", path = "./substreams-near" } -substreams-near-core = { version = "0.10.0", path = "./core" } +anyhow = "1" +bs58 = "0.4.0" +hex = "0.4.3" +prost = "0.13" +prost-build = "0.13" +prost-types = "0.13" +substreams = "0.6" +substreams-near = { version = "0.10.2", path = "./substreams-near" } +substreams-near-core = { version = "0.10.2", path = "./core" } diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..bc63d65 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,21 @@ +## Release Process + +### Instructions + +Requires `Bash`, [sfreleaser](https://github.com/streamingfast/sfreleaser) and [sd](https://github.com/chmln/sd): + +```bash +# *Important* Do not forget to replace `0.10.2` below by your real version! +export version="0.10.2" + +sd '^version = ".*?"$' "version = \"${version}\"" Cargo.toml +sd 'version = ".*?",' "version = \"${version}\"," Cargo.toml +sd '## Unreleased' "## ${version}" CHANGELOG.md + +# Important so that Cargo.lock is updated and you "test +cargo test --target aarch64-apple-darwin # Change 'aarch64-apple-darwin' to fit your own platform! + +git add -A . && git commit -m "Preparing release of ${version}" + +sfreleaser release "v${version}" +``` \ No newline at end of file diff --git a/core/Cargo.toml b/core/Cargo.toml index 1991af6..70d29dd 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -12,16 +12,16 @@ categories.workspace = true rust-version.workspace = true [dependencies] -prost = { version = "0.13" } -prost-types = "0.13" -bs58 = "0.4.0" -hex = "0.4.3" +bs58 = { workspace = true } +hex = { workspace = true } +prost = { workspace = true } +prost-types = { workspace = true } [build-dependencies] -prost-build = "0.13" +prost-build = { workspace = true } [dev-dependencies] -anyhow = "1" +anyhow = { workspace = true } [target.wasm32-unknown-unknown.dependencies] getrandom = { version = "0.2", features = ["custom"] } diff --git a/core/src/block_view.rs b/core/src/block_view.rs index 8e1ec23..93fe7a5 100644 --- a/core/src/block_view.rs +++ b/core/src/block_view.rs @@ -1,4 +1,4 @@ -use crate::{pb::sf::near::r#type::v1 as pb}; +use crate::pb::sf::near::r#type::v1 as pb; use hex; impl pb::Block { @@ -10,11 +10,9 @@ impl pb::Block { pub fn hash(&self) -> Option { match &self.header { - Some(header) => { - match &header.hash { - Some(hash) => Some(hex::encode(&hash.bytes)), - None => None, - } + Some(header) => match &header.hash { + Some(hash) => Some(hex::encode(&hash.bytes)), + None => None, }, None => None, } @@ -30,4 +28,3 @@ impl AsRef> for StateChangesView<'_> { self.state_changes } } - diff --git a/substreams-near/Cargo.toml b/substreams-near/Cargo.toml index 40d036c..1bbc763 100644 --- a/substreams-near/Cargo.toml +++ b/substreams-near/Cargo.toml @@ -12,11 +12,11 @@ categories.workspace = true rust-version.workspace = true [dependencies] -substreams = "^0.6.0" -substreams-near-core = { version = "0.10.0", path = "../core" } +substreams = { workspace = true } +substreams-near-core = { workspace = true } [target.wasm32-unknown-unknown.dependencies] getrandom = { version = "0.2", features = ["custom"] } [dev-dependencies] -anyhow = "1" \ No newline at end of file +anyhow = { workspace = true } diff --git a/substreams-near/src/lib.rs b/substreams-near/src/lib.rs index 098fa1e..bfce5ad 100644 --- a/substreams-near/src/lib.rs +++ b/substreams-near/src/lib.rs @@ -1 +1 @@ -pub use substreams_near_core::{block_view, pb}; \ No newline at end of file +pub use substreams_near_core::{block_view, pb};