Skip to content

chore(release): fix release.sh bugs and rewrite RELEASES.md - #1336

Merged
lklimek merged 2 commits into
v1.6-devfrom
chore/release-tooling-fixes
Jun 12, 2026
Merged

lklimek merged 2 commits into
v1.6-devfrom
chore/release-tooling-fixes

Conversation

@lklimek

@lklimek lklimek commented Jun 12, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Our release tooling had several bugs that surfaced during a real v1.6.0-dev.1 release dry-run. This PR fixes them and rewrites the release docs to match what the script actually does.

What was done?

scripts/release/release.sh

  • Milestone org fixed — was hitting repos/dashevo/tenderdash/milestones (wrong org); now uses the repos/{owner}/{repo}/milestones placeholder so gh resolves dashpay/tenderdash automatically. || true kept so a pre-existing milestone (HTTP 422) is tolerated.
  • No more TTY requirement — dropped docker run -ti; git-cliff needs no stdin, so the changelog step now works in unattended/CI runs.
  • Changelog branch-sync — validate now fetches origin and fast-forwards the local vX.Y-dev before generating the changelog, so commits on origin are never silently missed (the dry-run was 19 commits behind). Removed the now-redundant git pull -q.
  • Non-interactive auth — replaced the blocking gh auth login fallback with a clear error telling the user to authenticate first.
  • CLIFF_ARGS quoting — converted to a bash array so --ignore-tags reaches git-cliff without literal quote chars; the prerelease changelog now actually filters dev tags. Also clears shellcheck SC2089/SC2090.
  • Sign path: build from the tag + restore HEAD — buildAndUploadArtifacts now checks out the released tag before building signed binaries, and an EXIT trap restores the source branch so the developer is never stranded on detached HEAD.
  • Robust error() — the red ERROR: line now prints before cleanup, and cleanup's make clean is tolerant (|| true), so the message is never swallowed.
  • Added -o pipefail alongside the existing set -e.

RELEASES.md

  • Full rewrite to document the actual scripted flow (the old doc was stale Tendermint-inherited content: v0.Nx backport branches, CHANGELOG_PENDING.md, linkify_changelog.py, linkpatch, vuepress versions — none of which describe this repo).
  • Accurate CI section: release.yml is workflow_dispatch-only; nothing auto-runs on tag push or PRs.
  • Reconciled merge strategy: normal + prerelease PRs squash; full-release PR into master uses a merge commit.
  • Neutral tag-timing wording: draft-release tags are mutable and only guaranteed on the remote once published.
  • Preserved the full Minor Release Checklist (Feature Freeze, Nightly E2E, Upgrade Harness, Large-Scale Testnets).

scripts/release/pr_description.md

  • "Release new Dash Platform version" → "Release new Tenderdash version".
  • Added an ABCISemVer bump check to the checklist.

CONTRIBUTING.md

  • Fixed script path scripts/release.sh → scripts/release/release.sh.
  • Noted the full-release merge-commit exception to the squash-merge rule.

How Has This Been Tested?

bash -n scripts/release/release.sh passes. shellcheck is clean on every touched line (the only remaining item is a pre-existing SC2035 info on an untouched sha256sum *.tar.gz line). Findings originate from the v1.6.0-dev.1 dry-run.

Breaking Changes

None — script behavior outside the listed fixes is preserved; the default (non-sign) path is unaffected.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (RELEASES.md, CONTRIBUTING.md)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated and expanded release process documentation, including semantic versioning format, branch model, and release procedures. Updated contribution guidelines for release notes generation.
  • Chores

    • Improved release script reliability with enhanced error handling, authentication validation, and artifact build flow management.

lklimek and others added 2 commits June 12, 2026 17:29
release.sh fixes:
- Add -o pipefail to set flags for stricter error propagation
- Fix milestone API path: dashevo/tenderdash -> {owner}/{repo} placeholder
  so gh substitutes the correct org automatically; HTTP 422 (already exists)
  is still tolerated via || true
- Remove docker -ti flags that break non-interactive/CI runs (no TTY needed)
- Remove cryptic echo 2>CHANGELOG.md truncation; git-cliff --output rewrites
  the file already
- Add branch-sync check in validate: fetch origin and fast-forward local
  SOURCE_BRANCH before changelog generation, so commits are never missed
- Remove now-redundant git pull -q inside createReleasePR (sync moved earlier)
- Replace interactive gh auth login fallback with an error message directing
  the user to run it manually
- Implement signed-binary build from released tag in buildAndUploadArtifacts
  (git fetch --tags && git checkout tag before buildBinaries)

RELEASES.md: full rewrite to document the actual scripted release flow:
- Versioning scheme, branch model, protocol-version decision guide
- Prerequisites including the new origin-sync enforcement
- Step-by-step description of what the script does
- Merge strategy (squash for prerelease, merge commit for full release)
- Draft release publish flow and --sign path
- Accurate CI/build section (release.yml is workflow_dispatch)
- Retained the full Minor Release Checklist (Feature Freeze, Nightly E2E,
  Upgrade Harness, Large Scale Testnets)
- Removed all obsolete Tendermint-inherited content (backport branches v0.Nx,
  CHANGELOG_PENDING.md, linkify_changelog.py, linkpatch, vuepress versions)

scripts/release/pr_description.md:
- Fix "Dash Platform" -> "Tenderdash" in issue description
- Add ABCISemVer bump check to the checklist

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
release.sh:
- Convert CLIFF_ARGS to a bash array so --ignore-tags reaches git-cliff
  without literal quote chars (prerelease changelog now filters dev tags
  correctly); also clears shellcheck SC2089/SC2090
- Add EXIT trap in buildAndUploadArtifacts to restore SOURCE_BRANCH after
  the release-tag checkout, so the sign path never leaves a detached HEAD
- Print the ERROR: line before cleanup in error(), and make cleanup's
  make clean tolerant (|| true), so the error message is never swallowed

RELEASES.md:
- CI section: state accurately that release.yml is workflow_dispatch-only;
  the pull_request-gated build never fires and nothing auto-runs on tag push
- Reconcile merge-strategy contradiction: normal and prerelease PRs squash,
  full-release PR into master uses a merge commit
- Neutral tag-timing wording: draft release tags are mutable and only
  guaranteed on the remote once published

CONTRIBUTING.md:
- Fix script path scripts/release.sh -> scripts/release/release.sh
- Note the full-release PR merge-commit exception to the squash rule

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@lklimek
lklimek requested a review from QuantumExplorer as a code owner June 12, 2026 15:41
@coderabbitai

coderabbitai Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 63559c6e-84c1-4812-9fc5-4d81df14f8f3

📥 Commits

Reviewing files that changed from the base of the PR and between 757877f and 4700ac3.

📒 Files selected for processing (4)
  • CONTRIBUTING.md
  • RELEASES.md
  • scripts/release/pr_description.md
  • scripts/release/release.sh

📝 Walkthrough

Walkthrough

This PR updates release process documentation and hardens the release script. CONTRIBUTING.md and RELEASES.md are updated to document the semver/branching/execution flow; the release script gains error handling, auth validation, branch synchronization, tag management, and improved cleanup; and release description templates are updated with product name and version verification requirements.

Changes

Release Process Documentation and Script Hardening

Layer / File(s) Summary
Release process documentation and branching model
CONTRIBUTING.md, RELEASES.md
CONTRIBUTING.md updates the release-notes script path to scripts/release/release.sh and clarifies that full-release PRs into master use merge commits. RELEASES.md is substantially rewritten to document semantic versioning, vX.Y-dev vs master branching, protocol version bump rules, prerequisite origin sync, step-by-step execution flows, --sign behavior, CI manual triggering, Feature Freeze and nightly e2e requirements, and updated Large Scale Testnets specs with VM sizing, load patterns, and refreshed testnet descriptions.
Release script error handling and auth validation
scripts/release/release.sh
Shell startup adds pipefail to set -eo pipefail for better pipeline failures. The error() handler calls cleanup before exit. GitHub auth validation emits a clearer error message. Branch validation now fetches origin and fast-forwards the local source branch before proceeding.
Release script changelog generation and branch operations
scripts/release/release.sh
Changelog generation switches from string-based CLiFF_ARGS to an array for optional prerelease args, removes stderr redirection, and runs git-cliff without interactive mode. Release PR preparation removes the git pull step. Milestone creation generalizes the GitHub API endpoint from hardcoded dashevo/tenderdash to repos/{owner}/{repo}.
Release script artifact build and cleanup
scripts/release/release.sh
Artifact build adds an EXIT trap to restore the source branch, explicitly fetches tags and checks out the release tag before building signed binaries, and includes detached-head comments. Make clean becomes best-effort with `
Release description and version verification checklist
scripts/release/pr_description.md
Release PR description updates product name from "Dash Platform" to "Tenderdash" and adds a checklist item to verify ABCISemVer is bumped in version/version.go.

🎯 2 (Simple) | ⏱️ ~12 minutes

🐰 A release awaits, scripts now gleam,
With error traps and branch-sync dreams,
Tenderdash shines in docs so fine,
Checklist tightened, all in line! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: bug fixes to release.sh and a comprehensive rewrite of RELEASES.md documentation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-tooling-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes several reliability issues in scripts/release/release.sh discovered during a v1.6.0-dev.1 release dry-run, and rewrites release documentation/templates to reflect the script’s actual behavior.

Changes:

  • Hardened the release script around unattended runs (non-interactive gh auth behavior, pipefail, non-TTY docker run) and corrected milestone creation to use the current repo owner/name.
  • Improved correctness of generated changelogs and signed artifact builds (proper git-cliff arg passing; build/sign from the released tag with branch restoration).
  • Rewrote RELEASES.md and updated templates/contributing docs to match the current release flow and checklists.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
scripts/release/release.sh Fixes release automation edge cases (auth, origin sync, changelog generation, tag-based signing build, cleanup robustness).
scripts/release/pr_description.md Updates the release PR template wording and adds an ABCISemVer checklist item.
RELEASES.md Replaces stale release documentation with a description aligned to the current scripted process and repo branching model.
CONTRIBUTING.md Updates the release script path reference and documents the merge-commit exception for full releases.

Comment thread scripts/release/release.sh Resolved
Comment thread scripts/release/release.sh Resolved
Comment thread RELEASES.md Resolved
@lklimek
lklimek merged commit 983dedb into v1.6-dev Jun 12, 2026
18 checks passed
@lklimek
lklimek deleted the chore/release-tooling-fixes branch June 12, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants