mirror of
https://github.com/sbopkg/sbopkg
synced 2025-02-14 20:48:06 +01:00
git support: add ChangeLog.txt.
Since git repositories track the whole history of a project, there's no point in maintaining a change log for them. Sbopkg expects one nevertheless, since it's historically rsync oriented. This patch adds the little code needed to automatically generate a meaningful ChangeLog.txt from the project history. Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
This commit is contained in:
parent
30ad5a995d
commit
cf78790cc0
1 changed files with 11 additions and 0 deletions
|
@ -813,6 +813,12 @@ checkout_git_branch() {
|
||||||
# Make sure no changes are staged
|
# Make sure no changes are staged
|
||||||
git reset HEAD >> $COMMAND_OUTPUT
|
git reset HEAD >> $COMMAND_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create a changelog
|
||||||
|
# (it makes no sense to have one tracked in a git repo)
|
||||||
|
if [[ ! -f ChangeLog.txt ]]; then
|
||||||
|
git log --pretty=format:"%cd%n%s%n%b" > ChangeLog.txt
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_repo_vars() {
|
set_repo_vars() {
|
||||||
|
@ -1780,6 +1786,11 @@ git_command() {
|
||||||
echo "*/*/*.sbopkg" > .gitignore
|
echo "*/*/*.sbopkg" > .gitignore
|
||||||
git clean -d -f
|
git clean -d -f
|
||||||
git reset --hard HEAD
|
git reset --hard HEAD
|
||||||
|
# Create a changelog
|
||||||
|
# (it makes no sense to have one tracked in a git repo)
|
||||||
|
if [[ ! -f ChangeLog.txt ]]; then
|
||||||
|
git log --pretty=format:"%cd%n%s%n%b" > ChangeLog.txt
|
||||||
|
fi
|
||||||
# All done
|
# All done
|
||||||
rm -f $SBOPKGTMP/sbopkg_sync.lck
|
rm -f $SBOPKGTMP/sbopkg_sync.lck
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Add table
Reference in a new issue