mirror of
https://github.com/sbopkg/sbopkg
synced 2025-02-05 08:46:34 +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
|
||||
git reset HEAD >> $COMMAND_OUTPUT
|
||||
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() {
|
||||
|
@ -1780,6 +1786,11 @@ git_command() {
|
|||
echo "*/*/*.sbopkg" > .gitignore
|
||||
git clean -d -f
|
||||
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
|
||||
rm -f $SBOPKGTMP/sbopkg_sync.lck
|
||||
echo
|
||||
|
|
Loading…
Add table
Reference in a new issue