theme: test theme against min Hugo version #380

This commit is contained in:
Sören Weber 2022-12-29 01:53:28 +01:00
parent 2b9bbeb51d
commit bf1c4dce2f
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

13
exampleSite/test.min.bat Normal file
View file

@ -0,0 +1,13 @@
@echo off
set hugo_major=0
set hugo_minor=95
set hugo_patch=0
set /p version=<..\layouts\partials\version.txt
echo %version%>metrics.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%.txt
echo disableAssetsBusting=true>>config.toml
echo disableGeneratorVersion=true>>config.toml
hugo.%hugo_major%.%hugo_minor%.%hugo_patch% --templateMetrics --templateMetricsHints --cleanDestinationDir --destination public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch% >> metrics.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%.txt
move /Y metrics.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%.txt public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%\metrics.txt 2>&1 >NUL
git restore config.toml
For /F "UseBackQ Delims==" %%A In ("public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%\metrics.txt") Do Set "lastline=%%A"
echo %lastline%