1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

make.bat: optimize vc download

This commit is contained in:
yuyi 2020-05-22 16:46:55 +08:00 committed by GitHub
parent 1cc52b0fae
commit fe0b587b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

1
.gitignore vendored
View File

@ -18,6 +18,7 @@ a.out
.noprefix.vrepl_temp
# ignore v build files
/vc
/v.c
/v.*.c
/v.c.out

View File

@ -5,11 +5,14 @@ echo Building V
pushd %~dp0
if exist "vc" (
rd /s /q vc
)
echo Downloading v.c...
echo Updating vc...
cd vc
git pull
cd ..
) else (
echo Cloning vc...
git clone --depth 1 --quiet https://github.com/vlang/vc
)
REM option to force msvc or gcc
if "%~1"=="-gcc" goto :gcc_strap
@ -39,11 +42,9 @@ REM and it will be restored when v is a stable version.
v.exe self
if %ERRORLEVEL% NEQ 0 (
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
rd /s /q vc
goto :error
)
rd /s /q vc
del v_old.exe
goto :success
@ -81,12 +82,10 @@ REM and it will be restored when v is a stable version.
v.exe self
if %ERRORLEVEL% NEQ 0 (
echo V failed to build itself with error %ERRORLEVEL%
rd /s /q vc
del %ObjFile%
goto :compile_error
)
rd /s /q vc
del v_old.exe
del %ObjFile%