Skip to content

Commit 26c4142

Browse files
committed
MIT license; release notes without a pipe that SIGPIPEs under pipefail
1 parent d28dd52 commit 26c4142

4 files changed

Lines changed: 41 additions & 3 deletions

File tree

‎.github/workflows/release-edge.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
CGO_ENABLED=0 GOOS=linux GOARCH=$arch go build -trimpath \
8181
-ldflags "-s -w -X main.version=${VERSION} -X main.commit=${GITHUB_SHA::7} -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
8282
-o "$d/deyroute" ./cmd/deyroute
83-
cp README.md README.en.md CHANGELOG.md "$d/"
83+
cp README.md README.en.md CHANGELOG.md LICENSE "$d/"
8484
tar -C dist -czf "dist/deyroute_${VERSION}_linux_${arch}.tar.gz" "deyroute_${VERSION}_linux_${arch}"
8585
rm -rf "$d"
8686
done
@@ -128,8 +128,11 @@ jobs:
128128
echo "## What's new"
129129
echo
130130
# The newest three sections of the changelog; the rest is linked.
131-
awk '/^## \[Unreleased\]/{on=1; next} on && /^## \[/{exit} on' CHANGELOG.md |
132-
awk 'NR==1 && /^$/ {next} /^### /{n++} n>3{exit} {print}'
131+
# One awk reading the file: an early exit in a pipe is SIGPIPE
132+
# under pipefail.
133+
awk '/^## \[Unreleased\]/{on=1; next}
134+
on && /^## \[/{exit}
135+
on { if (!seen && /^$/) next; seen=1; if (/^### /) n++; if (n > 3) exit; print }' CHANGELOG.md
133136
echo
134137
echo "[Full changelog](${repo}/blob/${GITHUB_SHA}/CHANGELOG.md) · [راهنمای فارسی](${repo}/blob/main/docs/fa/index.md) · [English guides](${repo}/blob/main/docs/en/index.md)"
135138
echo

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 localroot4
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.en.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<a href="https://github.com/localroot4/DeyRoute/actions/workflows/ci.yml"><img alt="Tests" src="https://img.shields.io/github/actions/workflow/status/localroot4/DeyRoute/ci.yml?branch=main&label=tests"></a>
1212
<a href="https://github.com/localroot4/DeyRoute/releases"><img alt="Downloads" src="https://img.shields.io/github/downloads/localroot4/DeyRoute/total?color=1f6feb"></a>
1313
<a href="https://github.com/localroot4/DeyRoute/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/localroot4/DeyRoute?color=e3b341"></a>
14+
<a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/github/license/localroot4/DeyRoute?color=555"></a>
1415
<img alt="Ubuntu and Debian, amd64 and arm64" src="https://img.shields.io/badge/Ubuntu%20%7C%20Debian-amd64%20%7C%20arm64-555">
1516
</p>
1617

@@ -378,3 +379,7 @@ make test lint # unit tests and linters
378379

379380
Integration scenarios run in systemd containers: `test/integration/run.sh`
380381
(see the header of the script). Issues and pull requests are welcome.
382+
383+
## License
384+
385+
DEYROUTE is released under the [MIT license](LICENSE).

‎README.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<a href="https://github.com/localroot4/DeyRoute/actions/workflows/ci.yml"><img alt="Tests" src="https://img.shields.io/github/actions/workflow/status/localroot4/DeyRoute/ci.yml?branch=main&label=tests"></a>
1414
<a href="https://github.com/localroot4/DeyRoute/releases"><img alt="Downloads" src="https://img.shields.io/github/downloads/localroot4/DeyRoute/total?color=1f6feb"></a>
1515
<a href="https://github.com/localroot4/DeyRoute/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/localroot4/DeyRoute?color=e3b341"></a>
16+
<a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/github/license/localroot4/DeyRoute?color=555"></a>
1617
<img alt="Ubuntu and Debian, amd64 and arm64" src="https://img.shields.io/badge/Ubuntu%20%7C%20Debian-amd64%20%7C%20arm64-555">
1718
</p>
1819

@@ -448,3 +449,11 @@ make test lint # اجرای تست‌های واحد و بررسی کد
448449
(توضیحات ابتدای اسکریپت را ببینید). از Issue و Pull Request شما استقبال می‌کنیم.
449450

450451
</div>
452+
453+
<div dir="rtl">
454+
455+
## مجوز
456+
457+
DEYROUTE با [مجوز MIT](LICENSE) منتشر شده است: آزادانه استفاده کنید، تغییر دهید و منتشر کنید.
458+
459+
</div>

0 commit comments

Comments
 (0)