Skip to content

Commit cf5314d

Browse files
committed
fix(.zfunc): improve error handling in fn_release
1 parent 65414a9 commit cf5314d

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- "v*"
77

88
jobs:
99
release:
@@ -20,6 +20,7 @@ jobs:
2020
uses: softprops/action-gh-release@v2
2121
with:
2222
generate_release_notes: true
23+
# body: ${{ github.event.head_commit.message }}
2324
body_path: CHANGELOG.md
2425
env:
2526
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.zfunc/fn_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# $HOME/.zfunc
33
if [ -z "$1" ]; then
44
echo "Error: insert version (e.g. 1.2.3)"
5-
exit 1
5+
return 1
66
fi
77
git add . && \
88
git commit && \

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# Changelog
22

3-
## [2.1.1] - 2026-02-26
3+
## [2.1.2] - 2026-02-27
4+
5+
### Changed
6+
7+
- **.github/workflows/release.yml**: Add commented alternative for release notes generation via commit message
8+
- **LICENSE**: Update copyright year to 2026 and add copyright holder
49

510
### Fixed
611

7-
- **.zfunc/fn_release**: Use `return 1` instead of `exit 1` for proper function status handling in zsh
12+
- **.zfunc/fn_release**: Improve error handling for missing version argument
813

9-
[2.1.1]: https://github.com/andmitr/ArchLinux-utility-belt/releases/tag/v2.1.1
14+
[2.1.2]: https://github.com/andmitr/ArchLinux-utility-belt/releases/tag/v2.1.2

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 theEvilGrinch
3+
Copyright (c) 2026 Andrew Dmitriev
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

0 commit comments

Comments
 (0)