Skip to content

Commit 0790a74

Browse files
committed
tools/create-changelog.sh: Add list of changed controls
We want to also mention the new/removed/renamed controls in the release notes so that people can update their configs.
1 parent 0642212 commit 0790a74

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

tools/create-changelog.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ fmt="(%h) %<(80,trunc)%s%w(0,0,10)%+b"
3333
old_tag=$(git describe --tags --abbrev=0 --match "Release_*")
3434

3535
git --git-dir=$git_dir log --submodule=diff --no-merges --pretty="$fmt" $old_tag..HEAD > changelog.txt
36+
37+
$top_level/tools/get-changed-controls.sh >> changelog.txt

tools/get-changed-controls.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
3+
set -e
4+
# set -x
5+
6+
old_tag=$(git describe --tags --abbrev=0 --match "Release_*")
7+
8+
top_level=$(git rev-parse --show-toplevel)
9+
10+
if [ -z "$top_level" ]
11+
then
12+
echo "This is not a git repository"
13+
exit 1
14+
fi
15+
16+
for path in $(ls $top_level/Packages/MIES/*Macro.ipf)
17+
do
18+
file=$(basename $path)
19+
20+
for revision in HEAD $old_tag
21+
do
22+
output=controls_${file}_${revision}
23+
echo $output
24+
git show $revision:Packages/MIES/$file | grep -i -P \
25+
"\b(Button|Checkbox|PopupMenu|ValDisplay|SetVariable|Chart|Slider|Tab|GroupBox|Titlebox|ListBox|CustomControl)\b.*" | \
26+
cut -f 1 -d "," | cut -f 2 -d " " | sort | uniq > $output
27+
done
28+
29+
diff --unified=0 controls_${file}_${old_tag} controls_${file}_HEAD > controls_${file}_diff || true
30+
31+
echo ""
32+
echo "Changed controls for ${file}"
33+
echo ""
34+
cat controls_${file}_diff
35+
done

0 commit comments

Comments
 (0)