From 7c9c89467e47db1713890b7c63a18c175d2a7fd3 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Tue, 14 May 2024 15:39:04 -0400 Subject: [PATCH] all.bash: check that minified css files are unchanged Add a check that the minified css files correspond to the their sources. Previously, the all.bash script generated the minified files and left the modified files in the repo working copy. This may have helped during development, but during CI it should be a no-op. This CL simply verifies that. The developer can still run `devtools/cmd/static` manually. A check like this should be standard procedure for all binary or incrutable files that appear in CLs. Change-Id: I47d34e5204637ff38113b91ff46c595b9f42f4ee Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/585476 kokoro-CI: kokoro Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Mauri de Souza Meneguzzo Reviewed-by: Alan Donovan LUCI-TryBot-Result: Go LUCI --- all.bash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/all.bash b/all.bash index 5c3f43c3c..dd80f25af 100755 --- a/all.bash +++ b/all.bash @@ -181,6 +181,11 @@ check_script_hashes() { # run_build_static builds JavaScript output from TypeScript source files. run_build_static() { runcmd $GO run ./devtools/cmd/static + files=$(modified_files) + echo "mod: $files" + if [[ $(filter "$files" 'static/**/*.min*') != '' ]]; then + err "minimized CSS files are not consistent with unminimized ones; run ./devtools/cmd/static to regenerate them" + fi } run_npm() {