forked from IronLanguages/dlr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.proj
125 lines (105 loc) · 4.79 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<BuildFlavour Condition=" '$(BuildFlavour)' == '' ">Debug</BuildFlavour>
<Mono Condition="'$(OS)' != 'Windows_NT'">true</Mono>
<MajorVersion>1</MajorVersion>
<MinorVersion>2</MinorVersion>
<MicroVersion>0</MicroVersion>
<ReleaseLevel>alpha</ReleaseLevel>
<ReleaseSerial>0</ReleaseSerial>
<PackageVersion Condition="'$(ReleaseLevel)' == 'final'">$(MajorVersion).$(MinorVersion).$(MicroVersion)</PackageVersion>
<PackageVersion Condition="'$(ReleaseLevel)' != 'final' or '$(ReleaseSerial)' != '0'">$(MajorVersion).$(MinorVersion).$(MicroVersion)-$(ReleaseLevel)$(ReleaseSerial)</PackageVersion>
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
<Solution>$(RootDir)\Dlr.sln</Solution>
<StageDir>$(RootDir)\Stage\$(BuildFlavour)\dlr-$(PackageVersion)</StageDir>
<PackageDir>$(RootDir)\Package\$(BuildFlavour)\dlr-$(PackageVersion)</PackageDir>
<UtilDir>$(RootDir)\Util</UtilDir>
<BinDir>$(RootDir)\bin</BinDir>
<BuildSysDir>$(RootDir)\Build</BuildSysDir>
<BuildProperties>
RootDir=$(RootDir);
Solution=$(Solution);
BuildFlavour=$(BuildFlavour);
BinDir=$(BinDir);
StageDir=$(StageDir);
BuildSysDir=$(BuildSysDir);
Mono=$(Mono)
</BuildProperties>
</PropertyGroup>
<ItemGroup>
<ReferencedPlatform Include="net35">
<BuildPrefix>v2</BuildPrefix>
</ReferencedPlatform>
<ReferencedPlatform Include="net40">
<BuildPrefix></BuildPrefix>
</ReferencedPlatform>
<!-- Mono 3.2 is missing necessary bits for 4.5. -->
<ReferencedPlatform Include="net45" Condition=" '$(Mono)' != 'true' ">
<BuildPrefix>v45</BuildPrefix>
</ReferencedPlatform>
</ItemGroup>
<ItemGroup>
<InfoFiles Include="$(RootDir)\LICENSE" />
<InfoFiles Include="$(RootDir)\README" />
</ItemGroup>
<Target Name="Build">
<MSBuild
Projects="$(Solution)"
Targets="Build"
Properties="$(BuildProperties);ReferencedPlatform=%(ReferencedPlatform.Identity);Configuration=%(ReferencedPlatform.BuildPrefix)$(BuildFlavour)" />
</Target>
<Target Name="Rebuild">
<MSBuild
Projects="$(Solution)"
Targets="Rebuild"
Properties="$(BuildProperties);ReferencedPlatform=%(ReferencedPlatform.Identity);Configuration=%(ReferencedPlatform.BuildPrefix)$(BuildFlavour)" />
</Target>
<Target Name="Clean">
<MSBuild
Projects="$(Solution)"
Targets="Clean"
Properties="$(BuildProperties);ReferencedPlatform=%(ReferencedPlatform.Identity);Configuration=%(ReferencedPlatform.BuildPrefix)$(BuildFlavour)" />
</Target>
<Target Name="Stage">
<MSBuild
Projects="$(Solution)"
Targets="Build"
Properties="$(BuildProperties);ReferencedPlatform=%(ReferencedPlatform.Identity);Configuration=%(ReferencedPlatform.BuildPrefix)$(BuildFlavour);Staging=true">
<Output TaskParameter="TargetOutputs" ItemName="StageOutputs" />
</MSBuild>
<Copy DestinationFolder="$(StageDir)" SourceFiles="@(InfoFiles)" />
</Target>
<Target Name="Package" DependsOnTargets="ZipPackage;NuGetPackage" />
<Target Name="MakePackageDir">
<MakeDir Directories="$(PackageDir)" Condition="!Exists('$(PackageDir)')" />
</Target>
<PropertyGroup>
<NuGet>$(UtilDir)\NuGet\NuGet.exe</NuGet>
<NuGet Condition=" '$(Mono)' != '' ">mono $(NuGet)</NuGet>
<Zip Condition="'$(OS)' == 'Windows_NT'">$(UtilDir)\Misc\zip.exe</Zip>
<Zip Condition="'$(OS)' != 'Windows_NT'">zip</Zip>
</PropertyGroup>
<ItemGroup>
<Package Include="DynamicLanguageRuntime">
<NuSpecDir>$(RootDir)</NuSpecDir>
</Package>
<Package Include="Microsoft.Scripting.AspNet">
<NuSpecDir>$(RootDir)\Src\Hosts\MerlinWeb\Microsoft.Scripting.AspNet</NuSpecDir>
</Package>
</ItemGroup>
<ItemGroup>
<NuGetPackageInputs Include="@(Package->'%(NuSpecDir)\*.nuspec')" />
<NuGetPackageOutputs Include="@(Package->'$(PackageDir)\$(Filename).$(PackageVersion).nupkg')" />
</ItemGroup>
<Target Name="NuGetPackage" DependsOnTargets="Stage;MakePackageDir"
Inputs="@(NuGetPackageInputs);@(StageOutputs)"
Outputs="@(NuGetPackageOutputs)">
<Exec Command="$(NuGet) pack -Version $(PackageVersion) "%(Package.NuSpecDir)\%(Package.Identity).nuspec" -BasePath "$(StageDir)" -OutputDirectory "$(PackageDir)"" />
</Target>
<Target Name="ZipPackage" DependsOnTargets="Stage;MakePackageDir"
Inputs="@(StageOutputs)"
Outputs="$(PackageDir)\dlr-$(PackageVersion).zip">
<Exec Command="$(Zip) -9 -r "$(PackageDir)\dlr-$(PackageVersion).zip" "dlr-$(PackageVersion)"" WorkingDirectory="$(StageDir)\.." />
</Target>
</Project>