This repository was archived by the owner on May 9, 2022. It is now read-only.
forked from microsoft/VFSForGit
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathCreateBuildDrop.bat
More file actions
33 lines (27 loc) · 1.51 KB
/
CreateBuildDrop.bat
File metadata and controls
33 lines (27 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@ECHO OFF
CALL %~dp0\..\InitializeEnvironment.bat || EXIT /b 10
IF "%1"=="" GOTO USAGE
IF "%2"=="" GOTO USAGE
SETLOCAL enableextensions
SET Configuration=%1
SET VFS_STAGEDIR=%2
REM Prepare the staging directories for functional tests.
IF EXIST %VFS_STAGEDIR% (
rmdir /s /q %VFS_STAGEDIR%
)
mkdir %VFS_STAGEDIR%\src\Scripts
mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.Build
mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1
mkdir %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\
REM Make a minimal 'test' enlistment to pass along our pipeline.
copy %VFS_SRCDIR%\init.cmd %VFS_STAGEDIR%\src\
copy %VFS_SCRIPTSDIR%\*.* %VFS_STAGEDIR%\src\Scripts\
copy %VFS_OUTPUTDIR%\GVFS.Build\*.* %VFS_STAGEDIR%\BuildOutput\GVFS.Build
dotnet publish %VFS_SRCDIR%\GVFS\GVFS.FunctionalTests\GVFS.FunctionalTests.csproj -p:StyleCopEnabled=False --self-contained --framework netcoreapp2.1 -r win-x64 -c Release -o %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\
robocopy %VFS_OUTPUTDIR%\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests\bin\x64\%Configuration%\netcoreapp2.1\ /E /XC /XN /XO
copy %VFS_OUTPUTDIR%\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\*.* %VFS_STAGEDIR%\BuildOutput\GVFS.FunctionalTests.Windows\bin\x64\%Configuration%\
GOTO END
:USAGE
echo "ERROR: Usage: CreateBuildDrop.bat [configuration] [build drop root directory]"
exit 1
:END