You've already forked trmnl-home-assistant
mirror of
https://github.com/usetrmnl/trmnl-home-assistant.git
synced 2026-04-29 13:44:17 -07:00
643c7143e0
Prevents accidental releases from feature branches by checking the current branch before proceeding. Provides clear recovery steps when run from wrong branch. Dry-run mode remains available from any branch for previewing changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Release Scripts
release.js
Automates the version bump process across all project files.
What it does
- Bumps version in
package.json,config.yaml, andCHANGELOG.md - Creates a git commit with the changes
- Tags the commit with the new version
- Optionally pushes to remote
Usage
From the project root:
# Using npm scripts (recommended)
cd trmnl-ha/ha-trmnl
npm run release:patch # 0.0.1 -> 0.0.2
npm run release:minor # 0.0.1 -> 0.1.0
npm run release:major # 0.0.1 -> 1.0.0
npm run release:dry # See what would change
# Direct script usage
bun scripts/release.js patch
bun scripts/release.js minor --dry-run
bun scripts/release.js major --push
Options
--dry-run,-d- Preview changes without modifying files--push,-p- Push commit and tags to remote after release
Examples
# Preview a patch release
npm run release:dry
# Create a patch release (bug fixes)
npm run release:patch
# Create a minor release (new features) and push
bun scripts/release.js minor --push
# Create a major release (breaking changes)
npm run release:major
Before releasing
Make sure you have:
- Updated the
[Unreleased]section in CHANGELOG.md with your changes - Committed all your work (script checks for uncommitted changes)
- Updated your GitHub username in CHANGELOG.md URLs
After releasing
If you didn't use --push, remember to:
git push && git push --tags