Ajout d'un hook pour générer un fichier changelog 'temporaire'
This commit is contained in:
parent
6054755cdc
commit
efafcf204a
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
source "${TAMARIN_UTIL}"
|
||||
|
||||
if [ -f debian/changelog ] || [ ! -d .git ]; then
|
||||
info "Not a Git repository or Debian changelog already exists !"
|
||||
exit
|
||||
fi
|
||||
|
||||
changelog="debian/changelog"
|
||||
project_name=$(get_opt project_name)
|
||||
project_version=$(get_opt project_version '0.0.0')
|
||||
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}
|
|
@ -16,4 +16,4 @@ else
|
|||
version_suffix=tamarin$(date +%Y%m%d%H%M)
|
||||
fi
|
||||
|
||||
sed -i "0,/(\(.*\))/s/(\(.*\))/(\1-${version_suffix})/" debian/changelog
|
||||
sed -i "0,/(\(.*\))/s/(\(.*\))/(\1${version_suffix})/" debian/changelog
|
||||
|
|
Loading…
Reference in New Issue