refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.
This commit is contained in:
54
Scripts/Core/add_CommonTestController.bat
Normal file
54
Scripts/Core/add_CommonTestController.bat
Normal file
@@ -0,0 +1,54 @@
|
||||
setlocal disableDelayedExpansion
|
||||
|
||||
:Variables
|
||||
set InputFile=%2
|
||||
set OutputFile=%InputFile%#
|
||||
set entity=%1
|
||||
set "_strFind=Check_Dynamic_EntityControllers"
|
||||
set _strInsert1=[InlineData("%entity%")]
|
||||
set "_strInsert1= %_strInsert1%"
|
||||
|
||||
rem if already inserted, do nothing
|
||||
:Check
|
||||
for /F "delims=" %%L in ('findstr /n "^" "%InputFile%"') do (
|
||||
set "line=%%L"
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set "line=!line:*:=!"
|
||||
if "!line!" neq "" (
|
||||
set "_line=!line:%_strInsert1%=!"
|
||||
) else (
|
||||
set _line=!line!
|
||||
)
|
||||
if "!_line!" neq "!line!" goto finish
|
||||
endlocal
|
||||
)
|
||||
@echo off
|
||||
|
||||
:Replace
|
||||
>"%OutputFile%" (
|
||||
for /F "delims=" %%L in ('findstr /n "^" "%InputFile%"') do (
|
||||
set "line=%%L"
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set "line=!line:*:=!"
|
||||
if "!line!" neq "" (
|
||||
set "_line=!line:%_strFind%=!"
|
||||
) else (
|
||||
set _line=!line!
|
||||
)
|
||||
|
||||
|
||||
if "!_line!" neq "!line!" (
|
||||
echo !_strInsert1!
|
||||
)
|
||||
echo.!line!
|
||||
endlocal
|
||||
)
|
||||
)
|
||||
|
||||
del %InputFile%>nul
|
||||
copy %OutputFile% %InputFile%>nul
|
||||
del %OutputFile%>nul
|
||||
|
||||
:finish
|
||||
Reference in New Issue
Block a user