forked from aspnet/jquery-ajax-unobtrusive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.msbuild
37 lines (33 loc) · 1.5 KB
/
build.msbuild
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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<VersionFile Include="version.props"/>
</ItemGroup>
<PropertyGroup>
<NuspecPath>Microsoft.jQuery.Unobtrusive.Ajax.nuspec</NuspecPath>
<DistDir>$(MSBuildThisFileDirectory)dist\</DistDir>
<ArtifactsDir>$(MSBuildThisFileDirectory)artifacts\build\</ArtifactsDir>
<WebPackTestDir>$(MSBuildThisFileDirectory)test\webpacktest\</WebPackTestDir>
</PropertyGroup>
<ItemGroup>
<DistDirFiles Include="$(DistDir)*"/>
</ItemGroup>
<Target Name="Build">
<ReadLinesFromFile File="@(VersionFile)">
<Output TaskParameter="Lines" PropertyName="PackageVersion"/>
</ReadLinesFromFile>
<Exec Command="npm run build" />
<Exec Command="npm version --no-git-tag-version --allow-same-version $(PackageVersion)" />
<MakeDir Directories="$(ArtifactsDir)" />
<Copy
SourceFiles="@(DistDirFiles)"
DestinationFolder="$(ArtifactsDir)" OverwriteReadOnlyFiles="true"/>
<Exec Command="npm pack $(MSBuildThisFileDirectory)" WorkingDirectory="$(ArtifactsDir)" />
<Exec Command="nuget pack $(NuspecPath) -Version $(PackageVersion) -OutputDirectory $(ArtifactsDir)" />
<MSBuild Projects ="$(MSBuildProjectFullPath)"
Properties="PackageVersion=$(PackageVersion)"
Targets="Test" />
</Target>
<Target Name="Test">
<Message Text="No tests yet..." />
</Target>
</Project>