forked from alphacloud/Autofac.Extras.Quartz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
57 lines (47 loc) · 2.2 KB
/
build.proj
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildTarget Condition="'$(BuildTarget)' == ''">Rebuild</BuildTarget>
<BuildConfig Condition="'$(BuildConfig)' == ''">Debug</BuildConfig>
</PropertyGroup>
<!-- Directories -->
<PropertyGroup>
<RootDir>$(MSBuildProjectDirectory)</RootDir>
<SrcDir>$(RootDir)\src</SrcDir>
<PkgDir>$(SrcDir)\packages</PkgDir>
<NuGetExe>nuget.exe</NuGetExe>
<PackagesOutDir>$(RootDir)\out\packages</PackagesOutDir>
<TargetFrameworks>net462</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<SolutionDir>$(SrcDir)</SolutionDir>
<DownloadNuGetExe>true</DownloadNuGetExe>
<MainSolution>$(SrcDir)\Autofac.Extras.Quartz.sln</MainSolution>
</PropertyGroup>
<Target Name="Prepare">
<!--<Exec WorkingDirectory="$(SrcDir)"
Command="$(NuGetCommand) restore $(MainSolution)"
/>-->
</Target>
<Target Name="BuildAll" DependsOnTargets="Prepare">
<MSBuild Projects="$(MainSolution)" Properties="Configuration=$(BuildConfig);" Targets="$(BuildTarget)"
BuildInParallel="true" />
</Target>
<Target Name="CleanAll">
<Message Text="Performing full cleanup..." />
<MSBuild Projects="$(MainSolution)" Properties="Configuration=Debug" Targets="Clean" BuildInParallel="true" />
<MSBuild Projects="$(MainSolution)" Properties="Configuration=Release" Targets="Clean" BuildInParallel="true" />
</Target>
<Target Name="CreatePackagesDir">
<MakeDir Directories="$(PackagesOutDir)" ContinueOnError="true" />
</Target>
<Target Name="Test" DependsOnTargets="BuildAll">
<Exec WorkingDirectory="$(SrcDir)\Tests\bin\$(BuildConfig)"
Command="$(PkgDir)\Nunit.ConsoleRunner.3.5.0\tools\nunit3-console.exe Autofac.Extras.Quartz.Tests.dll /stoponerror --dispose-runners --noheader"
/>
</Target>
<Target Name="Pack" DependsOnTargets="CreatePackagesDir">
<Message Text="src: $(SrcDir)" />
<Exec Command="$(NuGetExe) pack Autofac.Extras.Quartz.nuspec -OutputDirectory $(PackagesOutDir) -Prop Configuration=Release -version "$(PackageVersion)" " WorkingDirectory="$(SrcDir)\Autofac.Extras.Quartz" />
</Target>
</Project>