Skip to content

Commit

Permalink
Add support of property OctoPackProjectName
Browse files Browse the repository at this point in the history
See http://docs.octopusdeploy.com/display/OD/Using+OctoPack

Without this, the nuspec and nupkg files always take MSBuildProjectName. 
The value of the property OctoPackProjectName defaults to MSBuildProjectName, thus, if no value for this property is specified in the csproj, the output files remains as before
  • Loading branch information
ypupo2002 authored Oct 27, 2016
1 parent 6af3538 commit c493944
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/OctoPack.Precompile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
<PropertyGroup>
<OctoPackPrecompileIntermediateOutputPath Condition="'$(OctoPackPrecompileIntermediateOutputPath)'==''">$(IntermediateOutputPath)PrecompiledIntermediate\</OctoPackPrecompileIntermediateOutputPath>
<OctoPackPrecompileOutputPath Condition="'$(OctoPackPrecompileOutputPath)'==''">$(IntermediateOutputPath)Precompiled\</OctoPackPrecompileOutputPath>
<OctoPackPrecompileNuSpecFileName Condition="'$(OctoPackPrecompileNuSpecFileName)'==''">$(IntermediateOutputPath)$(MSBuildProjectName).nuspec</OctoPackPrecompileNuSpecFileName>
<OctoPackPrecompileNuSpecFileName Condition="'$(OctoPackPrecompileNuSpecFileName)'==''">$(IntermediateOutputPath)$(OctoPackProjectName).nuspec</OctoPackPrecompileNuSpecFileName>
</PropertyGroup>

<Target Name="GenerateOctoPackPrecompileNuSpecFile" BeforeTargets="OctoPackPrecompile" Condition="'$(OctoPackNuSpecFileName)' == '' AND !Exists('$(MSBuildProjectName).nuspec')">
<Target Name="GenerateOctoPackPrecompileNuSpecFile" BeforeTargets="OctoPackPrecompile" Condition="'$(OctoPackNuSpecFileName)' == '' AND !Exists('$(OctoPackProjectName).nuspec')">
<PropertyGroup>
<OctoPackNuSpecFileName>$(OctoPackPrecompileNuSpecFileName)</OctoPackNuSpecFileName>
<PrecompileNuSpecFileContent>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>$(MSBuildProjectName)</id>
<authors>$(MSBuildProjectName)</authors>
<description>$(MSBuildProjectName)</description>
<id>$(OctoPackProjectName)</id>
<authors>$(OctoPackProjectName)</authors>
<description>$(OctoPackProjectName)</description>
<version>1.0.0</version>
</metadata>
<files>
Expand Down

0 comments on commit c493944

Please sign in to comment.