Check LFS using file size
This commit is contained in:
@@ -3,6 +3,12 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
testfilesize=$(wc -c < 'Source/Logo.png')
|
||||||
|
if [ $testfilesize -le 1000 ]; then
|
||||||
|
echo "CallBuildTool ERROR: Repository was not cloned using Git LFS" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Compile the build tool.
|
# Compile the build tool.
|
||||||
xbuild /nologo /verbosity:quiet "Source/Tools/Flax.Build/Flax.Build.csproj" /property:Configuration=Release /property:Platform=AnyCPU /target:Build
|
xbuild /nologo /verbosity:quiet "Source/Tools/Flax.Build/Flax.Build.csproj" /property:Configuration=Release /property:Platform=AnyCPU /target:Build
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ rem Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
|
|||||||
|
|
||||||
if not exist "Development\Scripts\Windows\GetMSBuildPath.bat" goto Error_InvalidLocation
|
if not exist "Development\Scripts\Windows\GetMSBuildPath.bat" goto Error_InvalidLocation
|
||||||
|
|
||||||
|
for %%I in (Source\Logo.png) do if %%~zI LSS 2000 (
|
||||||
|
goto Error_MissingLFS
|
||||||
|
)
|
||||||
|
|
||||||
call "Development\Scripts\Windows\GetMSBuildPath.bat"
|
call "Development\Scripts\Windows\GetMSBuildPath.bat"
|
||||||
if errorlevel 1 goto Error_NoVisualStudioEnvironment
|
if errorlevel 1 goto Error_NoVisualStudioEnvironment
|
||||||
|
|
||||||
@@ -33,6 +37,9 @@ Binaries\Tools\Flax.Build.exe %*
|
|||||||
if errorlevel 1 goto Error_FlaxBuildFailed
|
if errorlevel 1 goto Error_FlaxBuildFailed
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
|
:Error_MissingLFS
|
||||||
|
echo CallBuildTool ERROR: Repository was not cloned using Git LFS
|
||||||
|
goto Exit
|
||||||
:Error_InvalidLocation
|
:Error_InvalidLocation
|
||||||
echo CallBuildTool ERROR: The script is in invalid directory.
|
echo CallBuildTool ERROR: The script is in invalid directory.
|
||||||
goto Exit
|
goto Exit
|
||||||
|
|||||||
Reference in New Issue
Block a user