Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | CHANGELOG=deb/debian/changelog |
| 4 | DIST=unstable |
| 5 | FIRST=1 |
| 6 | |
| 7 | print_changelog_item() { |
| 8 | DATE=$(git log -1 --format=%cD ${TAG}) |
| 9 | DEBFULLNAME=$(git log -1 --format=%an ${TAG}) |
| 10 | DEBEMAIL=$(git log -1 --format=%ae ${TAG}) |
| 11 | |
| 12 | if [ ${FIRST} = 0 ]; then echo >> ${CHANGELOG}; fi |
| 13 | FIRST=0 |
| 14 | |
| 15 | echo "vpp (${VER}) ${DIST}; urgency=low" >> ${CHANGELOG} |
| 16 | echo >> ${CHANGELOG} |
| 17 | echo "${DESC}" >> ${CHANGELOG} |
| 18 | echo >> ${CHANGELOG} |
| 19 | echo " -- ${DEBFULLNAME} <${DEBEMAIL}> ${DATE}" >> ${CHANGELOG} |
| 20 | } |
| 21 | |
| 22 | VER=$(scripts/version) |
| 23 | TAG=HEAD |
| 24 | ADDS=$(echo ${VER} | sed -e 's/~.*//'| cut -s -d- -f2) |
| 25 | |
| 26 | rm -f ${CHANGELOG} |
| 27 | |
| 28 | if [ -n "${ADDS}" ]; then |
| 29 | DESC=" * includes ${ADDS} commits after $(echo ${VER}| cut -d- -f1) release" |
| 30 | print_changelog_item |
| 31 | fi |
| 32 | |
Ed Warnicke | 45050f8 | 2016-06-15 23:17:07 -0500 | [diff] [blame] | 33 | for TAG in $(git tag -l 'v[0-9][0-9].[0-9][0-9]' | sort -r ); do |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 34 | VER=$(echo ${TAG}| sed -e 's/^v//') |
| 35 | DESC=$(git tag -l -n20 ${TAG} | tail -n+2 | sed -e 's/^ */ /') |
| 36 | print_changelog_item |
| 37 | done |