test fingerprinted stylesheet package
This commit is contained in:
parent
281752e25b
commit
d9e2acd808
1 changed files with 17 additions and 1 deletions
|
|
@ -25,6 +25,9 @@ let
|
||||||
};
|
};
|
||||||
evaluatedConfig = evaluatedSystem.config;
|
evaluatedConfig = evaluatedSystem.config;
|
||||||
landingPage = self.packages.${system}.landing-page;
|
landingPage = self.packages.${system}.landing-page;
|
||||||
|
stylesheetHash =
|
||||||
|
builtins.substring 0 12 (builtins.hashFile "sha256" ../../site/styles.css);
|
||||||
|
stylesheetFileName = "styles-${stylesheetHash}.css";
|
||||||
landingVirtualHost = evaluatedConfig.services.nginx.virtualHosts."torahimderecheretz.com";
|
landingVirtualHost = evaluatedConfig.services.nginx.virtualHosts."torahimderecheretz.com";
|
||||||
discourseConfig = evaluatedConfig.services.discourse;
|
discourseConfig = evaluatedConfig.services.discourse;
|
||||||
backupConfig = evaluatedConfig.services.borgbackup.jobs.discourse;
|
backupConfig = evaluatedConfig.services.borgbackup.jobs.discourse;
|
||||||
|
|
@ -62,10 +65,23 @@ assert !(evaluatedConfig.services.nginx.virtualHosts ? "tide.yisroelbaum.com");
|
||||||
assert !(evaluatedConfig.services.nginx.virtualHosts ? "apitide.yisroelbaum.com");
|
assert !(evaluatedConfig.services.nginx.virtualHosts ? "apitide.yisroelbaum.com");
|
||||||
pkgs.runCommand "tide-module-test" { } ''
|
pkgs.runCommand "tide-module-test" { } ''
|
||||||
test -f ${landingPage}/index.html
|
test -f ${landingPage}/index.html
|
||||||
test -f ${landingPage}/styles.css
|
test -f ${landingPage}/${stylesheetFileName}
|
||||||
|
test ! -e ${landingPage}/styles.css
|
||||||
test -f ${landingPage}/robots.txt
|
test -f ${landingPage}/robots.txt
|
||||||
test -f ${landingPage}/assets/rav-hirsch-1847.jpg
|
test -f ${landingPage}/assets/rav-hirsch-1847.jpg
|
||||||
test -f ${landingPage}/assets/rav-hirsch-1847.webp
|
test -f ${landingPage}/assets/rav-hirsch-1847.webp
|
||||||
|
${pkgs.diffutils}/bin/cmp \
|
||||||
|
${../../site/styles.css} \
|
||||||
|
${landingPage}/${stylesheetFileName}
|
||||||
|
${pkgs.gnugrep}/bin/grep -F \
|
||||||
|
'href="/${stylesheetFileName}"' \
|
||||||
|
${landingPage}/index.html
|
||||||
|
if ${pkgs.gnugrep}/bin/grep -F \
|
||||||
|
'href="/styles.css"' \
|
||||||
|
${landingPage}/index.html; then
|
||||||
|
echo "unexpected unversioned stylesheet reference" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
${pkgs.gnugrep}/bin/grep -F \
|
${pkgs.gnugrep}/bin/grep -F \
|
||||||
"A Torah vision for the whole of life." \
|
"A Torah vision for the whole of life." \
|
||||||
${landingPage}/index.html
|
${landingPage}/index.html
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue