-
Notifications
You must be signed in to change notification settings - Fork 18
/
Build.cmd
43 lines (32 loc) · 1.56 KB
/
Build.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
@REM NOTE: This script must be run from a Visual Studio command prompt window
@setlocal
@ECHO off
SET CMDHOME=%~dp0.
if "%FrameworkDir%" == "" set FrameworkDir=%WINDIR%\Microsoft.NET\Framework
if "%FrameworkVersion%" == "" set FrameworkVersion=v4.0.30319
SET MSBUILDEXEDIR=%FrameworkDir%\%FrameworkVersion%
SET MSBUILDEXE=%MSBUILDEXEDIR%\MSBuild.exe
SET NUGETEXE=NUGET.exe
set PROJ=%CMDHOME%\DFramework.sln
@echo ===== Building %PROJ% =====
@echo Build Debug ==============================
SET CONFIGURATION=Debug
"%MSBUILDEXE%" /p:Configuration=%CONFIGURATION% "%PROJ%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo BUILD ok for %CONFIGURATION% %PROJ%
@echo Build Release ============================
SET CONFIGURATION=Release
"%MSBUILDEXE%" /p:Configuration=%CONFIGURATION% "%PROJ%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo BUILD ok for %CONFIGURATION% %PROJ%
@echo ===== wait for generate nupkg =====
del %CMDHOME%\*.nupkg
"%NUGETEXE%" pack DFramework\DFramework.csproj -Prop Configuration=%CONFIGURATION%
"%NUGETEXE%" pack Plusins\Autofac\DFramework.Autofac.csproj -Prop Configuration=%CONFIGURATION%
"%NUGETEXE%" pack Plusins\CouchbaseCache\DFramework.CouchbaseCache.csproj -Prop Configuration=%CONFIGURATION%
"%NUGETEXE%" pack Plusins\Log4net\DFramework.Log4net.csproj -Prop Configuration=%CONFIGURATION%
"%NUGETEXE%" pack Plusins\Memcached\DFramework.Memcached.csproj -Prop Configuration=%CONFIGURATION%
@echo ===== wait for generate nupkg =====
"%NUGETEXE%" push DFramework.*.nupkg -s http://10.0.0.200/
@echo ===== press any key ... =====
pause