Skip to content

Commit 7556f36

Browse files
author
Islam Amer
committed
Various fixes
1 parent 45e82dc commit 7556f36

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/service/tar_git

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ get_list_of_tags () {
338338
fmt='
339339
r=%(refname:short)
340340
t=%(*objecttype)
341-
d=%(*committerdate:iso8601)
342-
343341
if test "z$t" = z
344342
then
345-
d=%(committerdate:iso8601)
343+
d=%(committerdate:iso8601)
344+
else
345+
d=%(taggerdate:iso8601)
346346
fi
347347
d=$(date --date="$d" +%s)
348348
echo "$d $r"
@@ -472,7 +472,9 @@ get_tagmsg () {
472472
}
473473

474474
dash_trim () {
475-
sed -e 's/^/- /' -e '/^\s*$/d' -e '/^$/d'
475+
# and workaround for github breaking the subject line with ... automatically
476+
# in pull requests
477+
sed -e 's/^/- /' -e '/^\s*$/d' -e 's/JB#[0-9]\{1,\}\.\.\.$//'
476478
}
477479

478480
grep_entry () {
@@ -500,12 +502,13 @@ do_changelog_block () {
500502

501503
test -z "$tagmsg" || ENTRIES="$tagmsg"'\n'"$ENTRIES"
502504

505+
ENTRIES="$(echo -ne "$ENTRIES" | sort | uniq)"
506+
503507
test -z "$ENTRIES" || CHANGES="$CHANGES""$prev_changes_header"'\n'"$ENTRIES"'\n\n'
504508

505509
}
506510

507511
generate_changes () {
508-
509512
pushd $CLONE_NAME >/dev/null
510513

511514
CHANGES=""
@@ -591,7 +594,7 @@ generate_changes () {
591594
# also skip the next header and everything after it
592595
# and skip empty lines
593596
# effectively we select the entries block matching the current header
594-
sed -e "1,${LN}d" -e '/^\*.*-.*$/,$d' -e "/^$/d" "$CHANGESFILE" | sort | uniq >> "$SORTEDCHANGES"
597+
sed -e "1,${LN}d" -e '/^\*.*-.*$/,$d' -e '/^\s*$/d' "$CHANGESFILE" >> "$SORTEDCHANGES"
595598
echo "" >> "$SORTEDCHANGES"
596599
done
597600
cp "$SORTEDCHANGES" "$CHANGESFILE"
@@ -602,6 +605,7 @@ generate_changes () {
602605
fi
603606

604607
popd >/dev/null
608+
605609
}
606610

607611
changes_to_debian () {

0 commit comments

Comments
 (0)