chore: genReleaseNote support verrsion range
This commit updates the release script to handle the input version range provided via command line options. Now, you can specify the version range using the '-v' option, such as '-v v1.14.1...v1.14.2', and the script will generate the release notes based on the specified range.
The script parses the command line options, extracts the version range, and uses it in the 'git log' commands to capture the relevant commits. The output is then organized into different sections, including 'What's Changed', 'BUG & Fix', and 'Maintenance', along with the full changelog link.
This enhancement improves the flexibility and usability of the release script, allowing users to generate release notes for specific version ranges easily.
Co-authored-by: ChatGPT
2023-06-03 18:25:00 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
while getopts "v:" opt; do
|
|
|
|
case $opt in
|
|
|
|
v)
|
|
|
|
version_range=$OPTARG
|
|
|
|
;;
|
|
|
|
\?)
|
|
|
|
echo "Invalid option: -$OPTARG" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -z "$version_range" ]; then
|
|
|
|
echo "Please provide the version range using -v option. Example: ./genReleashNote.sh -v v1.14.1...v1.14.2"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "## What's Changed" > release.md
|
2023-06-09 20:59:59 +08:00
|
|
|
git log --pretty=format:"* %s by @%an" --grep="^feat" -i $version_range | sort -f | uniq >> release.md
|
chore: genReleaseNote support verrsion range
This commit updates the release script to handle the input version range provided via command line options. Now, you can specify the version range using the '-v' option, such as '-v v1.14.1...v1.14.2', and the script will generate the release notes based on the specified range.
The script parses the command line options, extracts the version range, and uses it in the 'git log' commands to capture the relevant commits. The output is then organized into different sections, including 'What's Changed', 'BUG & Fix', and 'Maintenance', along with the full changelog link.
This enhancement improves the flexibility and usability of the release script, allowing users to generate release notes for specific version ranges easily.
Co-authored-by: ChatGPT
2023-06-03 18:25:00 +08:00
|
|
|
echo "" >> release.md
|
|
|
|
|
|
|
|
echo "## BUG & Fix" >> release.md
|
2023-06-09 20:59:59 +08:00
|
|
|
git log --pretty=format:"* %s by @%an" --grep="^fix" -i $version_range | sort -f | uniq >> release.md
|
chore: genReleaseNote support verrsion range
This commit updates the release script to handle the input version range provided via command line options. Now, you can specify the version range using the '-v' option, such as '-v v1.14.1...v1.14.2', and the script will generate the release notes based on the specified range.
The script parses the command line options, extracts the version range, and uses it in the 'git log' commands to capture the relevant commits. The output is then organized into different sections, including 'What's Changed', 'BUG & Fix', and 'Maintenance', along with the full changelog link.
This enhancement improves the flexibility and usability of the release script, allowing users to generate release notes for specific version ranges easily.
Co-authored-by: ChatGPT
2023-06-03 18:25:00 +08:00
|
|
|
echo "" >> release.md
|
|
|
|
|
|
|
|
echo "## Maintenance" >> release.md
|
2023-06-09 20:59:59 +08:00
|
|
|
git log --pretty=format:"* %s by @%an" --grep="^chore\|^docs\|^refactor" -i $version_range | sort -f | uniq >> release.md
|
chore: genReleaseNote support verrsion range
This commit updates the release script to handle the input version range provided via command line options. Now, you can specify the version range using the '-v' option, such as '-v v1.14.1...v1.14.2', and the script will generate the release notes based on the specified range.
The script parses the command line options, extracts the version range, and uses it in the 'git log' commands to capture the relevant commits. The output is then organized into different sections, including 'What's Changed', 'BUG & Fix', and 'Maintenance', along with the full changelog link.
This enhancement improves the flexibility and usability of the release script, allowing users to generate release notes for specific version ranges easily.
Co-authored-by: ChatGPT
2023-06-03 18:25:00 +08:00
|
|
|
echo "" >> release.md
|
|
|
|
|
|
|
|
echo "**Full Changelog**: https://github.com/MetaCubeX/Clash.Meta/compare/$version_range" >> release.md
|