Base gestion des paramètres par défaut

This commit is contained in:
2015-10-29 17:40:26 +01:00
parent 30332dc5cb
commit 1ba20bc279
5 changed files with 44 additions and 34 deletions

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
source "${TAMARIN_UTIL}"
if [ ! -f debian/changelog ] || [ ! -d .git ]; then
info "To auto calculate the package version suffix, we need a git environment and a existing changelog !"
exit
fi
commit_count=$(git rev-list --count --first-parent HEAD)
current_commit=$(git log -n 1 --pretty=format:"%h")
version_suffix=tamarin${commit_count}~${current_commit}
sed "0,/(\(.*\))/s/(\(.*\))/(\1-${version_suffix})/" debian/changelog
exit 1