Skip to content

Commit 7d70ef9

Browse files
committed
chore: prepare release v2.1.2
1 parent 03da687 commit 7d70ef9

File tree

3 files changed

+64
-10
lines changed

3 files changed

+64
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [2.1.2] - 2025-07-30
11-
12-
### Fixed
13-
14-
- Preserve trailing delimiters instead of moving to beginning. This resolves an issue where trailing delimiters (like commas at the end of lists) were incorrectly repositioned to the start of sorted content.
15-
1610
### Added
1711

1812
- Enhanced release script with automation support. The release script now supports CI environments, dry-run mode, and improved validation for streamlined releases.
@@ -22,6 +16,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2216
- Enhanced error handling and validation across core modules for improved stability.
2317
- Updated test infrastructure to use minimal_init.lua for better test isolation and reliability.
2418

19+
## [2.1.2] - 2025-07-30
20+
21+
### Fixed
22+
23+
- Preserve trailing delimiters instead of moving to beginning. This resolves an issue where trailing delimiters (like commas at the end of lists) were incorrectly repositioned to the start of sorted content.
24+
2525
## [2.1.1] - 2025-07-12
2626

2727
### Fixed

RELEASE.md

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ This document outlines the automated process for creating a new release of sort.
1414
```
1515

1616
The script automatically handles:
17+
1718
- Version validation and conflict checking
18-
- Test execution and code formatting verification
19+
- Test execution and code formatting verification
1920
- Version updates in `lua/sort/init.lua`
2021
- Git commit, tagging, and pushing to origin
2122

@@ -29,17 +30,70 @@ The script automatically handles:
2930
## Post-release
3031

3132
After the tag is pushed, GitHub Actions will:
33+
3234
- Run the full test suite
3335
- Create a GitHub release with changelog notes
3436
- Generate downloadable archives
3537

3638
## Version Numbering
3739

3840
This project follows [Semantic Versioning](https://semver.org/):
41+
3942
- **MAJOR**: Incompatible API changes
40-
- **MINOR**: New functionality in a backwards compatible manner
43+
- **MINOR**: New functionality in a backwards compatible manner
4144
- **PATCH**: Backwards compatible bug fixes
4245

46+
## Changelog Validation
47+
48+
GitHub Actions enforces strict semantic versioning rules for changelog validation. Understanding these rules prevents release failures:
49+
50+
### Semantic Versioning Rules
51+
52+
**Patch releases (x.y.Z)** - Only backward-compatible bug fixes:
53+
54+
-**Allowed sections**: `Fixed`, `Security`
55+
-**Not allowed**: `Added`, `Changed`, `Deprecated`, `Removed`
56+
57+
**Minor releases (x.Y.z)** - New functionality, backward-compatible:
58+
59+
-**Allowed sections**: `Added`, `Changed`, `Fixed`, `Security`, `Deprecated`
60+
-**Not allowed**: `Removed` (unless it's deprecated functionality)
61+
62+
**Major releases (X.y.z)** - Breaking changes:
63+
64+
-**Allowed sections**: All sections including `Removed`
65+
66+
### Common Validation Errors
67+
68+
**Error**: `Only 'fixed, security' sections are allowed for version x.y.Z`
69+
70+
- **Cause**: Patch release contains `Added` or `Changed` sections
71+
- **Solution**: Either:
72+
1. Move `Added`/`Changed` items to `Unreleased` section and create patch release
73+
2. Delete tag and create minor release (x.Y+1.0) instead
74+
75+
**Error**: Changelog entry validation failed
76+
77+
- **Cause**: Version section missing or malformed in CHANGELOG.md
78+
- **Solution**: Ensure proper format: `## [x.y.z] - YYYY-MM-DD`
79+
80+
### Version Selection Guide
81+
82+
Choose version type based on your changes:
83+
84+
- **Bug fixes only** → Patch release (2.1.2)
85+
- **New features or enhancements** → Minor release (2.2.0)
86+
- **Breaking changes** → Major release (3.0.0)
87+
4388
## Troubleshooting
4489

45-
If the release script fails, it provides clear error messages and suggestions. For GitHub Actions issues, check the workflow logs at: https://github.com/sQVe/sort.nvim/actions
90+
If the release script fails, it provides clear error messages and suggestions. For GitHub Actions issues, check the workflow logs at: https://github.com/sQVe/sort.nvim/actions
91+
92+
### Release Workflow Failures
93+
94+
If GitHub Actions release fails after tagging:
95+
96+
1. Check the workflow logs for specific error messages
97+
2. Fix the issue (often changelog validation)
98+
3. Amend the relevant commits and force-push to re-trigger the workflow
99+
4. If needed, delete and recreate the tag with corrected content

lua/sort/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local utils = require('sort.utils')
55
local mappings = require('sort.mappings')
66

77
local M = {
8-
_VERSION = '2.1.1',
8+
_VERSION = '2.1.2',
99
_DESCRIPTION = 'Sorting plugin for Neovim',
1010
_URL = 'https://github.com/sQVe/sort.nvim',
1111
_LICENSE = 'MIT',

0 commit comments

Comments
 (0)