Permalink
Browse files

added support for nuget publishing

  • Loading branch information...
1 parent bafe160 commit 4716181d593c448b83a6dc86d88e75382b2907f8 @nberardi nberardi committed Feb 3, 2011
View
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
+ <UsingTask TaskName="NUnitTeamCity" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)" />
+ <UsingTask AssemblyFile="$(MSBuildExtensionsPath)\NuGet\NuGet.MSBuild.dll" TaskName="NuGet.MSBuild.NuGet" />
+
+ <ItemGroup>
+ <MainProjects Include="src\**\*.csproj" />
+ <TestProjects Include="test\**\*.csproj" />
+ <AllProjects Include="@(MainProjects);@(TestProjects)" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <AssemblyName>ManagedFusion.Web</AssemblyName>
+ <AssemblyInfo>src\Properties\AssemblyInfo.cs</AssemblyInfo>
+ <PackagePath>nuget</PackagePath>
+ <PackageSpec>$(PackagePath)\$(AssemblyName).nuspec</PackageSpec>
+ <PackageBuildPath>build</PackageBuildPath>
+ <PackageId>$(AssemblyName)</PackageId>
+ <NuGetExe>lib\nuget.exe</NuGetExe>
+ <NuPackage>$(PackageBuildPath)\$(PackageId).$(build_number).nupkg</NuPackage>
+ </PropertyGroup>
+
+ <Target Name="CleanPackage">
+ <RemoveDir Directories="$(PackageBuildPath)" Condition="Exists($(PackageBuildPath))"/>
+ </Target>
+
+ <Target Name="Clean" DependsOnTargets="CleanPackage">
+ <TeamCityProgressMessage Text="Cleaning Projects" />
+ <MSBuild Projects="@(AllProjects)" Targets="Clean"/>
+ </Target>
+
+ <Target Name="SetVersion" DependsOnTargets="Clean">
+ <TeamCityProgressMessage Text="Update Version" />
+ <FileUpdate
+ Files="$(AssemblyInfo)"
+ Regex='\[assembly: (Assembly(File)?Version)\("([0-9\.\*]+)"\)\]'
+ ReplacementText='[assembly: $1("$(build_number)")]' />
+
+ <XmlUpdate
+ XmlFileName="$(PackageSpec)"
+ XPath="/package/metadata/version"
+ Value="$(build_number)"/>
+ </Target>
+
+ <Target Name="Test" DependsOnTargets="SetVersion">
+ <TeamCityProgressMessage Text="Building Tests" />
+ <MSBuild Projects="@(TestProjects)" Targets="Rebuild">
+ <Output TaskParameter="TargetOutputs" ItemName="TestOutput"/>
+ </MSBuild>
+
+ <TeamCityProgressMessage Text="Running Tests" />
+ <NUnitTeamCity Assemblies="@(TestOutput)" NUnitVersion="NUnit-2.5.9" />
+ </Target>
+
+ <Target Name="Build" DependsOnTargets="SetVersion">
+ <TeamCityProgressMessage Text="Building Projects" />
+ <MSBuild Projects="@(MainProjects)" Targets="Rebuild" />
+ </Target>
+
+ <Target Name="Package" DependsOnTargets="Test">
+ <TeamCityProgressMessage Text="Packaging NuGet" />
+
+ <ItemGroup>
+ <AssembliesToPackage Include="src\bin\**\$(AssemblyName).dll" />
+ </ItemGroup>
+
+ <RemoveDir Directories="$(PackagePath)\lib" />
+ <Copy SourceFiles="@(AssembliesToPackage)" DestinationFolder="$(PackagePath)\lib\net35\" />
+ <Copy SourceFiles="@(AssembliesToPackage)" DestinationFolder="$(PackageBuildPath)" />
+
+ <NuGet SpecFile="$(PackageSpec)" PackageDir="$(PackageBuildPath)" />
+ </Target>
+
+ <Target Name="Deploy" DependsOnTargets="Package">
+ <TeamCityProgressMessage Text="Deploying NuGet" />
+
+ <Exec Command="$(NuGetExe) update" />
+ <Exec Command="$(NuGetExe) push $(NuPackage) $(package_key)" />
+ </Target>
+</Project>
View
@@ -5,6 +5,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManagedFusion.Web", "src\Ma
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManagedFusion.Web.Tests", "test\ManagedFusion.Web.Tests\ManagedFusion.Web.Tests.csproj", "{9548F38C-6F75-44AD-81C6-418330CF879E}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{ECE32E40-EF71-443C-AA4C-988ABEE74D74}"
+ ProjectSection(SolutionItems) = preProject
+ ManagedFusion.Web.msbuild = ManagedFusion.Web.msbuild
+ nuget\ManagedFusion.Web.nuspec = nuget\ManagedFusion.Web.nuspec
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
View
Binary file not shown.
View
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package>
+ <metadata>
+ <id>ManagedFusion.Web</id>
+ <version>3.5.7</version>
+ <title>Managed Fusion Web</title>
+ <authors>Nick Berardi</authors>
+ <owners>Managed Fusion, LLC</owners>
+ <description>Managed Fusion Web contains a bunch of useful extensions for MVC and uses the a light weight serialization for JSON, XML, CSV to create REST API's.</description>
+ <summary>Managed Fusion Web contains a bunch of useful extensions for MVC and uses the a light weight serialization for JSON, XML, CSV to create REST API's.</summary>
+ <language>en-US</language>
+ <projectUrl>https://github.com/managedfusion/managedfusion-web</projectUrl>
+ <licenseUrl>https://github.com/managedfusion/managedfusion-web/raw/master/LICENSE.txt</licenseUrl>
+ <iconUrl>https://github.com/managedfusion/managedfusion-web/raw/master/nuget/ManagedFusion.Logo.png</iconUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <tags>managedfusion web .net40</tags>
+ <dependencies>
+ <dependency id="ManagedFusion" version="(1.0,)" />
+ </dependencies>
+ </metadata>
+</package>

0 comments on commit 4716181

Please sign in to comment.