Andrew Woodlee
4b382bddd9
* Getting environment variables and passwords from Vault (not tested yet) * Vault configuration to config (not tested yet) * Ability to run scripts from file on local machine on the remote host * Ability to get ouput in the notification of a list for individual commands or all commands * Make SSH connections close after all commands have been run; reuse previous connections if needed
22 lines
1.2 KiB
Batchfile
22 lines
1.2 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
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%.log
|
|
hugo.%hugo_major%.%hugo_minor%.%hugo_patch% --environment testing --templateMetrics --templateMetricsHints --cleanDestinationDir --destination public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch% >> metrics.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%.log
|
|
|
|
set "start_dir=%CD%\public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%"
|
|
set "output_file=dir.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%.log"
|
|
if exist "%output_file%" del "%output_file%"
|
|
for /r "%start_dir%" %%F in (*) do (
|
|
set "file=%%F"
|
|
echo !file:%start_dir%\=! >> "%output_file%"
|
|
)
|
|
move /Y dir.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%.log public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%\dir.log 2>&1 >NUL
|
|
|
|
move /Y metrics.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%.log public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%\metrics.log 2>&1 >NUL
|
|
For /F "UseBackQ Delims==" %%A In ("public.%version%.hugo.%hugo_major%.%hugo_minor%.%hugo_patch%\metrics.log") Do Set "lastline=%%A"
|
|
echo %lastline%
|