Base gestion des paramètres par défaut
This commit is contained in:
15
hooks/07-bump-package-version-prebuild
Executable file
15
hooks/07-bump-package-version-prebuild
Executable 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
|
Reference in New Issue
Block a user