forked from aspnet/Entropy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.cmd
34 lines (27 loc) · 815 Bytes
/
deploy.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
@ECHO OFF
PUSHD %~dp0
SETLOCAL
IF NOT DEFINED DEPLOYMENT_SOURCE (
SET DEPLOYMENT_SOURCE=%~dp0%.
)
IF NOT DEFINED DEPLOYMENT_TARGET (
SET DEPLOYMENT_TARGET=%~dp0%artifacts\deploment
)
IF NOT EXIST .nuget (
MKDIR .nuget
)
IF NOT EXIST .nuget\nuget.exe (
ECHO Downloading NuGet.exe
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '.nuget\nuget.exe'"
)
ECHO Downloading ProjectK
.nuget\nuget.exe install ProjectK -Prerelease -OutputDirectory packages -NoCache
FOR /D %%G IN (packages\ProjectK.*) DO (
SET K_CMD=%~dp0%%G\tools\k.cmd
)
FOR /D %%G IN (samples\*.Web) DO (
CD "%DEPLOYMENT_SOURCE%\%%G"
CALL "%K_CMD%" restore
CALL "%K_CMD%" pack --out "%DEPLOYMENT_TARGET%"
)
POPD