mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 20:12:30 +01:00
3ed6f5b382
* Don't uniq warnings and write initial build to file * Don't build twice, turn ccache off by default
30 lines
763 B
Bash
Executable File
30 lines
763 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set -o pipefail
|
|
|
|
# This script can be used when you want to test locally the amount of warnings produced by your changes before doing a PR.
|
|
|
|
pyflags=""
|
|
rebuild=false
|
|
|
|
if [[ $1 == "--jenkins" ]]
|
|
then
|
|
pyflags="--pr-message"
|
|
rebuild=false
|
|
else
|
|
rebuild=true
|
|
fi
|
|
|
|
if $rebuild
|
|
then
|
|
echo "Rebuilding to collect warnings..."
|
|
rm -rf ver/*/build/src
|
|
ninja | grep warning | sort > tools/warnings_count/warnings_new.txt
|
|
else
|
|
cat build_log.txt | grep warning | sort > tools/warnings_count/warnings_new.txt
|
|
fi
|
|
|
|
curl -L https://papermar.io/reports/warnings.txt > tools/warnings_count/warnings.txt
|
|
|
|
python3 tools/warnings_count/compare_warnings.py tools/warnings_count/warnings.txt tools/warnings_count/warnings_new.txt $pyflags
|