diff --git a/.changelog/unreleased/miscellaneous/4117-split-release.md b/.changelog/unreleased/miscellaneous/4117-split-release.md new file mode 100644 index 00000000000..320b7c29ff6 --- /dev/null +++ b/.changelog/unreleased/miscellaneous/4117-split-release.md @@ -0,0 +1,5 @@ +- Starting from the next release the Namada binary apps (`namada`, `namadan`, + `namadac` and `namadaw`) will be versioned separately from the libaries + (everything else including the wasm). The libraries releases will have their + tag prefixed with "lib-" and will continue with the current versioning scheme. + ([\#4117](https://github.com/anoma/namada/pull/4117)) \ No newline at end of file diff --git a/crates/apps/Cargo.toml b/crates/apps/Cargo.toml index 0f9d0a0873b..c8b8fb6136c 100644 --- a/crates/apps/Cargo.toml +++ b/crates/apps/Cargo.toml @@ -11,7 +11,7 @@ keywords.workspace = true license.workspace = true readme.workspace = true repository.workspace = true -version.workspace = true +version = "0.46.0" # Namada CLI that aggregates some common commands for the node and the client [[bin]] diff --git a/crates/apps/release.toml b/crates/apps/release.toml new file mode 100644 index 00000000000..1534c4c1e9a --- /dev/null +++ b/crates/apps/release.toml @@ -0,0 +1,7 @@ +allow-branch = ["main", "maint-*"] +consolidate-commits = true +pre-release-commit-message = "Namada {{version}}" +publish = false +push = false +shared-version = false +tag = false diff --git a/release.toml b/release.toml index 632e36bc028..55b34cd88b5 100644 --- a/release.toml +++ b/release.toml @@ -1,6 +1,6 @@ allow-branch = ["main", "maint-*"] consolidate-commits = true -pre-release-commit-message = "Namada {{version}}" +pre-release-commit-message = "Namada libs {{version}}" publish = false push = false shared-version = true diff --git a/scripts/release_bins.sh b/scripts/release_bins.sh new file mode 100755 index 00000000000..c5a6e89dd11 --- /dev/null +++ b/scripts/release_bins.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# depends on cargo-release 0.24.4, git 2.24.0 or later, unclog 0.5.0 +set -e + +if [ -z "$1" ]; then + echo "please specify a version to release" + exit 1 +fi + +REPO_ROOT=$(git rev-parse --show-toplevel) + +if [ "$REPO_ROOT" != "$PWD" ]; then + echo "please run from repository root" + exit 1 +fi + +VERSION="$1" +TAG_NAME="v$1" + +# start from a clean build +git clean -fxd + +# update the apps crate versions (1 commit) +HASH_BEFORE=$(git rev-parse HEAD) +cd $REPO_ROOT/crates/apps +cargo release version --execute $VERSION +git commit -am "Namada $VERSION" +HASH_AFTER=$(git rev-parse HEAD) + +# update the changelog (1 fixup) +cd $REPO_ROOT +unclog release $TAG_NAME +unclog build > CHANGELOG.md +git add .changelog CHANGELOG.md +git commit --fixup=$HASH_AFTER + +# show the user the result +git rebase --interactive --autosquash --keep-base $HASH_BEFORE + +echo "final $TAG_NAME commit ready for testing" + diff --git a/scripts/release.sh b/scripts/release_libs.sh similarity index 88% rename from scripts/release.sh rename to scripts/release_libs.sh index 3c12c2c4258..9b509649d94 100755 --- a/scripts/release.sh +++ b/scripts/release_libs.sh @@ -15,15 +15,15 @@ if [ "$REPO_ROOT" != "$PWD" ]; then fi VERSION="$1" -TAG_NAME="v$1" +TAG_NAME="libs-v$1" # prefixed to distinguish from bins release # start from a clean build git clean -fxd # update the main workspace crate versions (1 commit) HASH_BEFORE=$(git rev-parse HEAD) -cargo release version --execute $VERSION -git commit -am "Namada $VERSION" +cargo release version --exclude namada_apps --execute $VERSION +git commit -am "Namada libs $VERSION" HASH_AFTER=$(git rev-parse HEAD) # update the wasm workspace crate versions (1 fixup) diff --git a/wasm/release.toml b/wasm/release.toml index dbacf2cec36..af34e3c3d6f 100644 --- a/wasm/release.toml +++ b/wasm/release.toml @@ -1,6 +1,6 @@ allow-branch = ["main", "maint-*"] consolidate-commits = true -pre-release-commit-message = "fixup! Namada {{version}}" +pre-release-commit-message = "fixup! Namada libs {{version}}" publish = false push = false shared-version = true diff --git a/wasm_for_tests/release.toml b/wasm_for_tests/release.toml index 3a264faa088..c60a08039e0 100644 --- a/wasm_for_tests/release.toml +++ b/wasm_for_tests/release.toml @@ -1,6 +1,6 @@ allow-branch = ["main", "maint-*"] consolidate-commits = true -pre-release-commit-message = "fixup! Namada {{version}}" +pre-release-commit-message = "fixup! Namada libs {{version}}" publish = false push = false shared-version = true