This repository has been archived by the owner on Nov 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.proj
35 lines (29 loc) · 1.84 KB
/
package.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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Version Condition=" '$(BuildNumber)' == '' ">1.0.0.0</Version>
<Version Condition=" '$(BuildNumber)' != '' ">$(BuildNumber)</Version>
<OutputPath Condition=" '$(PackagePath)' == '' ">$(MSBuildThisFileDirectory)package</OutputPath>
<OutputPath Condition=" '$(PackagePath)' != '' ">$(PackagePath)</OutputPath>
</PropertyGroup>
<ItemGroup>
<NuspecFiles Include="$(SolutionDir)**\*.nuspec" Exclude="Drey.nuspec" />
<Samples Include="$(SolutionDir)package\Sample*.nupkg" />
</ItemGroup>
<Target Name="Build">
<Message Text="Working in solution directory: '$(MSBuildThisFileDirectory)'" />
<Message Text="Creating directory '$(OutputPath)' if not exists." />
<MakeDir Directories="$(OutputPath)" Condition="!Exists($(OutputPath))" />
<Message Text="%(NuspecFiles.Identity)" />
<Exec WorkingDirectory="$(MSBuildThisFileDirectory)"
Command=".nuget\nuget.exe pack %(NuspecFiles.Identity) -IncludeReferencedProjects -NoDefaultExcludes -NoPackageAnalysis -OutputDirectory "$(OutputPath)" -Version $(Version) -Properties "configuration=$(Configuration)" -Verbosity detailed" />
</Target>
<Target Name="Publish">
<Message Text="%(Samples.Identity)" />
<Exec WorkingDirectory="$(MSBuildThisFileDirectory)"
Command=".nuget\nuget.exe push %(Samples.Identity) -Source http://localhost:81/api/v2/package " />
</Target>
</Project>