Skip to content

Commit

Permalink
chore: bump version to 0.14.0-dev.7 for tenderdash v0.14.0-dev.3, abc…
Browse files Browse the repository at this point in the history
…i 0.26.0
  • Loading branch information
lklimek committed Mar 8, 2024
1 parent 448a2ce commit 9c8d18a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion abci/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
version = "0.14.0-dev.6"
version = "0.14.0-dev.7"
name = "tenderdash-abci"
edition = "2021"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion proto-compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
version = "0.14.0-dev.6"
version = "0.14.0-dev.7"
name = "tenderdash-proto-compiler"
authors = ["Informal Systems <[email protected]>", "Dash Core Group"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
version = "0.14.0-dev.6"
version = "0.14.0-dev.7"
name = "tenderdash-proto"
edition = "2021"
license = "Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion proto/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::env;

fn main() {
const DEFAULT_VERSION: &str = "v0.14.0-dev.2";
// default Tenderdash version to use if TENDERDASH_COMMITISH is not set
const DEFAULT_VERSION: &str = "v0.14.0-dev.3";

// check if TENDERDASH_COMMITISH is already set; if not, set it to the current
// version
Expand Down
14 changes: 8 additions & 6 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

PLATFORM_DIR="$(realpath "$(dirname $0)/../../platform")"
PLATFORM_DIR="$(realpath "$(dirname "$0")/../../platform")"

function help() {
cat <<EOF
Expand Down Expand Up @@ -63,25 +63,27 @@ if [ -z "$td_version" ]; then
echo "Please specify the version of Tenderdash."
exit 1
fi
td_version=${td_version#v} # remove 'v' if it exists

if [ -z "$rs_tenderdash_abci_version" ]; then
echo "Please specify the version of the library."
exit 1
fi

rs_tenderdash_abci_version=${rs_tenderdash_abci_version#v} # remove 'v' if it exists

set -ex
# Update the version in the Cargo.toml files.
sed -i "s/^version = .*/version = \"$rs_tenderdash_abci_version\"/" ./*/Cargo.toml
# sed -i "s/^\s*const DEFAULT_VERSION.*;/const DEFAULT_VERSION: &str = \"$td_version\";/g" ./proto/build.rs
sed -i "s/^\s*const DEFAULT_VERSION: &str = \".*\";/const DEFAULT_VERSION: \&str = \"$td_version\";/" ./proto/build.rs
sed -i "s/^\s*const DEFAULT_VERSION: &str = \".*\";/const DEFAULT_VERSION: \&str = \"v$td_version\";/" ./proto/build.rs
cargo fmt -- ./proto/build.rs 2>/dev/null

if [ -d "$PLATFORM_DIR" ]; then
rs_tenderdash="git = \"https:\/\/github.com\/dashpay\/rs-tenderdash-abci\", version = \"$rs_tenderdash_abci_version\" "
echo "INFO: Updating references to tenderdash-abci / tenderdash-proto in $PLATFORM_DIR"

sed -i "s/^tenderdash-abci = { git = .* }/tenderdash-abci = { $rs_tenderdash }/" ${PLATFORM_DIR}/packages/*/Cargo.toml
sed -i "s/^tenderdash-proto = { git = .* }/tenderdash-proto = { $rs_tenderdash }/" ${PLATFORM_DIR}/packages/*/Cargo.toml
sed -i "s/^tenderdash-abci = { git = .* }/tenderdash-abci = { $rs_tenderdash }/" "${PLATFORM_DIR}"/packages/*/Cargo.toml
sed -i "s/^tenderdash-proto = { git = .* }/tenderdash-proto = { $rs_tenderdash }/" "${PLATFORM_DIR}"/packages/*/Cargo.toml
else
echo WARN: Dash Platform not found in $PLATFORM_DIR, skipping
echo "WARN: Dash Platform not found in $PLATFORM_DIR, skipping"
fi

0 comments on commit 9c8d18a

Please sign in to comment.