mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 14:06:14 -05:00
33 lines
440 B
Bash
Executable File
33 lines
440 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
tag="${1:-}"
|
|
|
|
if [[ -z "$tag" ]]; then
|
|
echo "Usage: $0 <tag>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
version="${tag#v}"
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
changelog="$script_dir/../changelog.md"
|
|
|
|
awk -v version="$version" '
|
|
$0 == "## " version {
|
|
found = 1
|
|
next
|
|
}
|
|
found && /^## / {
|
|
exit
|
|
}
|
|
found {
|
|
print
|
|
}
|
|
END {
|
|
if (!found) {
|
|
exit 1
|
|
}
|
|
}
|
|
' "$changelog"
|