3 # Copyright (c) 2015 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 CHANGELOG=deb/debian/changelog
20 print_changelog_item() {
21 DATE=$(git log -1 --format=%cD ${TAG})
22 DEBFULLNAME=$(git log -1 --format=%an ${TAG})
23 DEBEMAIL=$(git log -1 --format=%ae ${TAG})
25 if [ ${FIRST} = 0 ]; then echo >> ${CHANGELOG}; fi
28 echo "vpp (${VER}) ${DIST}; urgency=low" >> ${CHANGELOG}
30 echo "${DESC}" >> ${CHANGELOG}
32 echo " -- ${DEBFULLNAME} <${DEBEMAIL}> ${DATE}" >> ${CHANGELOG}
35 VER=$(scripts/version)
37 ADDS=$(echo ${VER} | sed -e 's/~.*//'| cut -s -d- -f2)
41 if [ -n "${ADDS}" ]; then
42 DESC=" * includes ${ADDS} commits after $(echo ${VER}| cut -d- -f1) release"
46 for TAG in $(git tag -l 'v[0-9][0-9].[0-9][0-9]' | sort -r ); do
47 VER=$(echo ${TAG}| sed -e 's/^v//')
48 DESC=$(git tag -l -n20 ${TAG} | tail -n+2 | sed -e 's/^ */ /')