I wanted to know how many times we've changes a Release:
tag in any of the package spec files under the LLVM umbrella over the course of the last 13 years.
Here's the script I ran:
projects="clang llvm lldb lld python-lit mlir libomp"
(for y in {2023..2010}; do
for p in $projects; do
rows=$(git -C ~/dev/llvm-rpms/$p-fedora \
log \
--patch \
--since $y-01-01 \
--until $y-12-31 \
-- $p.spec 2>&1\
| grep -ioP "\+Release:\s*\K[0-9]+" \
| sort \
| uniq -c\
| sort -nr \
| tr " " ":")
for r in $rows; do
echo -n "$p|$y|"
echo "$r" | grep -ioP "[0-9].*" | tr ":" "|"
done
done
done) | column \
-s '|' \
-t \
--table-name "Release" \
--table-columns "project,year,occurences,Release:-tag" \
-R 3,4 \
-o " "
The output can be seen in output.txt
below.
Any Release:
tag with a 1
essentially means we've upgraded to another LLVM release.