File: release_note_generator.sh

package info (click to toggle)
python-dropbox 12.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,772 kB
  • sloc: python: 76,994; sh: 27; makefile: 24
file content (10 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

git fetch origin --tags
last_version=$(git tag --sort v:refname | tail -n 2 | head -n 1)
echo "Getting commit history since $last_version"
num_commits=$(git rev-list --count $last_version..HEAD)
echo "Found $num_commits commits since last revision"
git_log=$(git log -n $num_commits --pretty="format:* %s %n")
linked_log=$(echo "Release Notes: \n\n$git_log" | sed -e 's/#\([0-9]*\)/[#\1](https:\/\/github.com\/dropbox\/dropbox-sdk-python\/pull\/\1)/g')
echo "\n\n$linked_log"