2015-12-19 20:10:30 +01:00
|
|
|
#!/usr/bin/env bash
|
2017-02-09 21:53:24 +01:00
|
|
|
|
|
|
|
cd src
|
2015-12-19 20:10:30 +01:00
|
|
|
|
|
|
|
if [ -f debian/changelog ] || [ ! -d .git ]; then
|
2017-02-09 21:53:24 +01:00
|
|
|
tamarin_info "Not a Git repository or Debian changelog already exists !"
|
2015-12-19 20:10:30 +01:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
changelog="debian/changelog"
|
2017-02-09 21:53:24 +01:00
|
|
|
project_name=$(tamarin_db get project_name)
|
|
|
|
project_version=$(tamarin_db get project_version 0.0.0)
|
2015-12-19 20:10:30 +01:00
|
|
|
date=$(date -R)
|
|
|
|
top_contributor=$(git log --pretty=short | git shortlog -s -n -e | sed 's/^\s*[0-9]*\s*//g' | head -n 1)
|
|
|
|
current_commit=$(git log -n 1 --pretty=format:%h)
|
|
|
|
|
|
|
|
echo "${project_name} (${project_version}) unstable; urgency=low" > ${changelog}
|
|
|
|
echo >> ${changelog}
|
|
|
|
echo " * Package built with Tamarin. Based on commit ${current_commit}." >> ${changelog}
|
|
|
|
echo >> ${changelog}
|
|
|
|
echo " -- ${top_contributor} ${date}" >> ${changelog}
|