38 строки
1.5 KiB
Plaintext
38 строки
1.5 KiB
Plaintext
<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>
|