ci: Ensure eslint output exists

We are a long time away from an error-free eslint run,
but when we get there eventually, let's not trip over
non-existent files ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/730
This commit is contained in:
Florian Müllner 2019-08-14 13:14:23 +02:00 committed by Florian Müllner
parent 55b57421dc
commit caa50dc1a3

View File

@ -16,8 +16,14 @@ run_eslint() {
ARGS_LEGACY='--config lint/eslintrc-legacy.json' ARGS_LEGACY='--config lint/eslintrc-legacy.json'
local extra_args=ARGS_$1 local extra_args=ARGS_$1
local output=OUTPUT_$1 local output_var=OUTPUT_$1
eslint -f unix ${!extra_args} -o ${!output} js local output=${!output_var}
# ensure output exists even if eslint doesn't report any errors
mkdir -p $(dirname $output)
touch $output
eslint -f unix ${!extra_args} -o $output js
} }
list_commit_range_additions() { list_commit_range_additions() {