Skip to content

Commit 53144a4

Browse files
committed
Automate bug report update
1 parent 884c230 commit 53144a4

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Scripts/update_bug_reports.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
3+
# Update packages, run linters, update bug reports.
4+
5+
set -euo pipefail
6+
7+
[[ -z "$ALIBUILD_WORK_DIR" ]] && { echo "ALIBUILD_WORK_DIR not defined."; exit 1; }
8+
9+
dir_alice="$HOME/alice"
10+
11+
# Delete the latest O2 dev build.
12+
# We want to build it from scratch as a dependency of O2Physics to get the log with all compilation warnings.
13+
rm -rf "$ALIBUILD_WORK_DIR/BUILD/$(readlink O2-latest-dev)"
14+
15+
# Switch to O2@dev.
16+
cd "${dir_alice}/O2"
17+
git switch dev
18+
# Switch to O2Physics@master.
19+
cd "${dir_alice}/O2Physics"
20+
git switch master
21+
# Switch to Run3Analysisvalidation@alicecerno2.
22+
cd "${dir_alice}/Run3Analysisvalidation"
23+
git switch alicecerno2
24+
25+
# Update and build all packages.
26+
time nice exec/update_packages.py config/packages.yml
27+
28+
# Switch to O2Physics@bug-tracker and update it from master.
29+
cd "${dir_alice}/O2Physics"
30+
git switch bug-tracker
31+
git rebase master
32+
33+
# Update bug reports for each repo.
34+
for repo in O2 O2Physics; do
35+
echo "Starting processing ${repo}"
36+
# Run linters and make bug reports.
37+
time nice "${dir_alice}/O2Physics/Scripts/make_linter_reports.sh" "$repo"
38+
# Sync reports in the wiki repo.
39+
dir_wiki="${dir_alice}/${repo}.wiki"
40+
rsync -avh "${dir_alice}/${repo}/report_"* "${dir_wiki}/"
41+
# Update reports on GitHub.
42+
cd "${dir_wiki}"
43+
git add -u
44+
git commit -m "Update reports"
45+
git push
46+
done
47+
48+
# Switch to O2Physics@master.
49+
cd "${dir_alice}/O2Physics"
50+
git switch master

0 commit comments

Comments
 (0)