diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2018-10-07 07:52:27 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2018-10-07 07:52:27 +0200 |
commit | 8be7095570b131d81916fb43ebb42c1034487c7a (patch) | |
tree | 0a02226e577c3ddc65c823317946a34395802126 | |
parent | 6675601c81de85b40dc89772c1d6d17f1811c5ba (diff) |
prepare-release: Fix last-modification detection for manpages
Pass -i to git log, so "Release foo" is detected as well, not just
"release foo", and also handle the rename of Git-Dch to Gbp-Dch.
-rwxr-xr-x | prepare-release | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/prepare-release b/prepare-release index 3a5281f89..c93976f9a 100755 --- a/prepare-release +++ b/prepare-release @@ -81,10 +81,11 @@ if [ "$1" = 'pre-export' ]; then # update the last-modification field of manpages based on git changes grep --files-with-matches '<date>' doc/*.xml | while read file; do \ - LASTMOD="$(date -d "@$(git log --format='%at' --max-count=1 --invert-grep --fixed-strings --grep 'review + LASTMOD="$(date -d "@$(git log -i --format='%at' --max-count=1 --invert-grep --fixed-strings --grep 'review typo release -Git-Dch: Ignore' "$file")" '+%Y-%m-%dT00:00:00Z')" +Git-Dch: Ignore +Gbp-Dch: ignore' "$file")" '+%Y-%m-%dT00:00:00Z')" sed -i -e "s#^\([ ]\+\)<date>.*</date>\$#\1<date>$LASTMOD</date>#" "$file" done |