Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split release versions of bins and libs #4117

Merged
merged 8 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changelog/unreleased/miscellaneous/4117-split-release.md
Original file line number Diff line number Diff line change
@@ -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))
2 changes: 1 addition & 1 deletion crates/apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
7 changes: 7 additions & 0 deletions crates/apps/release.toml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion release.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
41 changes: 41 additions & 0 deletions scripts/release_bins.sh
Original file line number Diff line number Diff line change
@@ -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"

6 changes: 3 additions & 3 deletions scripts/release.sh → scripts/release_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion wasm/release.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion wasm_for_tests/release.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading