Description
Describe the bug
A clear and concise description of what the bug is.
generate_changelog.sh
expects BSD sort
for sorting what is called dictionary order (e.g. -d
) however on ubuntu
it seems that the sort
command (unknown version for now) does not sort the change-log entries correctly or even consistently at all.
To Reproduce
Steps to reproduce the behavior:
- use BSD sort environment (e.g. macOS) to run
generate_changelog.sh HEAD...stable > /tmp/bsd_changelog.txt
- use Ubuntu sort environment to run
generate_changelog.sh HEAD...stable > /tmp/linux_changelog.txt
- collect both
bsd_changelog.txt
andlinux_changelog.txt
into a single environment and check withgit diff --no-index bsd_changelog.txt linux_changelog.txt
- See error in sorting
Expected behavior
A clear and concise description of what you expected to happen.
There should not be such a difference between the generated change-logs that the majority of the contents are sorted differently (a few differences in very similar lines would be fine, but not un-sorted)
should probably add function to sort, check sorted, and loop until working or fail at timeout
graph TD;
input-->BUFFER;
BUFFER-->sort;
sort-->BUFFER;
BUFFER-->output;
sequenceDiagram
participant script as "generate_changelog.sh"
participant func as Sort Function
script->>func: call function with INPUT
create participant BUFFER as string buffer
func-->>BUFFER: Initialize buffer with INPUT
loop: while unsorted
create participant Sort as sort command
func-->>Sort: sort buffer
BUFFER->>Sort: does sort stuff
Sort-->>BUFFER: update BUFFER with sorted results
Sort->>func: done
func-->>Sort: check buffer is indeed sorted
BUFFER->>Sort: does sort check stuff
alt if sorted
Sort->>func: buffer is sorted
func-->>func: Exit Loop
else not sorted
destroy Sort
Sort->>func: buffer is Unsorted
func-->>func: Continue Loop
end
end
destroy BUFFER
BUFFER->>func: drain buffer as output
func->>script: return sorted output
Additional context (optional)
- see
generate_changelog.sh
Namely:
multicast/generate_changelog.sh
Line 341 in bd23f96
Metadata
Metadata
Assignees
Labels
Type
Projects
Status