hugo-theme-relearn/exampleSite/test.bat

12 lines
548 B
Batchfile
Raw Normal View History

2022-11-13 12:39:36 +00:00
@echo off
set /p version=<..\layouts\partials\version.txt
echo %version%>metrics.%version%.txt
echo disableAssetsBusting=true>>config.toml
echo disableGeneratorVersion=true>>config.toml
2023-05-17 20:55:34 +00:00
echo disableRandomIds=true>>config.toml
hugo --templateMetrics --templateMetricsHints --cleanDestinationDir --destination public.%version% >> metrics.%version%.txt
2022-11-13 12:39:36 +00:00
move /Y metrics.%version%.txt public.%version%\metrics.txt 2>&1 >NUL
git restore config.toml
2022-11-13 12:39:36 +00:00
For /F "UseBackQ Delims==" %%A In ("public.%version%\metrics.txt") Do Set "lastline=%%A"
echo %lastline%