forked from MicrosoftDocs/quantum-docs-pr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsync.cmd
43 lines (38 loc) · 944 Bytes
/
sync.cmd
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
34
35
36
37
38
39
40
41
42
43
::
:: This script syncs api\prelude and api\canon with the build output
::
call :prepare
call :build
call :updateOne Solid\src\Quantum.Primitives api\prelude
REM call :updateOne Libraries\Microsoft.Quantum.Canon api\canon
git commit -m "Updating from script."
git push
EXIT /B
::
:: Prepares the repo for building
::
:prepare
git submodule foreach git checkout origin/master
Solid\bin\nuget restore Solid\src\Qflat.sln
Solid\bin\nuget restore Libraries\QsharpLibraries.sln
EXIT /B
::
:: builds docgen and the yaml files
::
:build
msbuild Solid\src\qflat\docgen
msbuild /t:clean Solid\src\Quantum.Primitives
msbuild /t:clean Libraries\Microsoft.Quantum.Canon
msbuild /t:QsharpDocgen Solid\src\Quantum.Primitives
msbuild /t:QsharpDocgen Libraries\Microsoft.Quantum.Canon
EXIT /B
::
:: Updates one docs api folder
::
:updateOne
set source=%1
set target=%2
git rm %target%\*
xcopy %source%\obj\qsharp\docs %target% /I
git add %target%
EXIT /B