This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
335e769
commit e9c5604
Showing
3 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,4 @@ source/Samples/Notes.txt | |
source/Samples/.octopack | ||
_ReSharper* | ||
source/Samples/packages | ||
!source/build |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<UsingTask TaskName="OctoPack.Tasks.CreateOctoPackPackage" AssemblyFile="OctoPack.Tasks.dll" /> | ||
<UsingTask TaskName="OctoPack.Tasks.GetAssemblyVersionInfo" AssemblyFile="OctoPack.Tasks.dll" /> | ||
|
||
<!-- Hook into the AfterBuild activity --> | ||
<PropertyGroup> | ||
<BuildDependsOn> | ||
$(BuildDependsOn); | ||
OctoPack | ||
</BuildDependsOn> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Configuration properties - you can override these from the command line | ||
--> | ||
<PropertyGroup> | ||
<OctoPackImported>true</OctoPackImported> | ||
|
||
<RunOctoPack Condition="'$(RunOctoPack)'==''">false</RunOctoPack> | ||
<OctoPackIncludeTypeScriptSourceFiles Condition="'$(OctoPackIncludeTypeScriptSourceFiles)'==''">false</OctoPackIncludeTypeScriptSourceFiles> | ||
<OctoPackNuSpecFileName Condition="'$(OctoPackNuSpecFileName)' == ''"></OctoPackNuSpecFileName> | ||
<OctoPackAppendToPackageId Condition="'$(OctoPackAppendToPackageId)' == ''"></OctoPackAppendToPackageId> | ||
<OctoPackAppendToVersion Condition="'$(OctoPackAppendToVersion)' == ''"></OctoPackAppendToVersion> | ||
<OctoPackReleaseNotesFile Condition="'$(OctoPackReleaseNotesFile)' == ''"></OctoPackReleaseNotesFile> | ||
<OctoPackNuGetExePath Condition="'$(OctoPackNuGetExePath)' == ''"></OctoPackNuGetExePath> | ||
<OctoPackPublishPackageToFileShare Condition="'$(OctoPackPublishPackageToFileShare)' == ''"></OctoPackPublishPackageToFileShare> | ||
<OctoPackPublishPackageToHttp Condition="'$(OctoPackPublishPackageToHttp)' == ''"></OctoPackPublishPackageToHttp> | ||
<OctoPackPublishApiKey Condition="'$(OctoPackPublishApiKey)' == ''"></OctoPackPublishApiKey> | ||
<OctoPackPackageVersion Condition="'$(OctoPackPackageVersion)' == ''"></OctoPackPackageVersion> | ||
<OctoPackNuGetArguments Condition="'$(OctoPackNuGetArguments)' == ''"></OctoPackNuGetArguments> | ||
<OctoPackNugetProperties Condition="'$(OctoPackNuGetProperties)' == ''"></OctoPackNugetProperties> | ||
<OctoPackEnforceAddingFiles Condition="'$(OctoPackEnforceAddingFiles)' == ''">false</OctoPackEnforceAddingFiles> | ||
<OctoPackNuGetPushProperties Condition="'$(OctoPackNuGetPushProperties)' == ''"></OctoPackNuGetPushProperties> | ||
<OctoPackPublishPackagesToTeamCity Condition="'$(OctoPackPublishPackagesToTeamCity)' == ''">true</OctoPackPublishPackagesToTeamCity> | ||
<OctoPackProjectName Condition="'$(OctoPackProjectName)' == ''">$(MSBuildProjectName)</OctoPackProjectName> | ||
<OctoPackIgnoreNonRootScripts Condition="'$(OctoPackIgnoreNonRootScripts)' == ''">false</OctoPackIgnoreNonRootScripts> | ||
<OctoPackAppConfigFileOverride Condition="'$(OctoPackAppConfigFileOverride)' == ''">$(TargetDir)$(TargetFileName).config</OctoPackAppConfigFileOverride> | ||
<OctoPackAppendProjectToFeed Condition="'$(OctoPackAppendProjectToFeed)' == ''">false</OctoPackAppendProjectToFeed> | ||
<OctoPackUseFileVersion Condition="'$(OctoPackUseFileVersion)' == ''">false</OctoPackUseFileVersion> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Create Octopus Deploy package | ||
--> | ||
<Target Name="OctoPack" Condition="$(RunOctoPack)"> | ||
<GetAssemblyVersionInfo UseFileVersion="$(OctoPackUseFileVersion)" AssemblyFiles="$(TargetPath)" Condition="'$(OctoPackPackageVersion)' == ''"> | ||
<Output TaskParameter="AssemblyVersionInfo" ItemName="AssemblyVersions"/> | ||
</GetAssemblyVersionInfo> | ||
<PropertyGroup> | ||
<OctoPackPackageVersion Condition="'$(OctoPackPackageVersion)' == ''">%(AssemblyVersions.Version)</OctoPackPackageVersion> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<OctoPackPackageVersion Condition="'$(OctoPackPackageVersion)' == ''"><!-- Use the value from nuspec, or 1.0.0 if not in NuSpec --></OctoPackPackageVersion> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<OctoPackNuGetProperties Condition="'$(OctoPackNuGetProperties)' == ''"></OctoPackNuGetProperties> | ||
</PropertyGroup> | ||
<!-- | ||
Append project name so that you can nest packages in a structure such as [orgName]/[PackageName]/PackageName.Version.nupkg | ||
--> | ||
<PropertyGroup> | ||
<OctoPackPublishPackageToHttp Condition="'$(OctoPackPublishPackageToHttp)' != '' AND '$(OctoPackAppendProjectToFeed)'">$(OctoPackPublishPackageToHttp)/$(MSBuildProjectName)</OctoPackPublishPackageToHttp> | ||
</PropertyGroup> | ||
|
||
<Message Text="Using package version: $(OctoPackPackageVersion)" /> | ||
|
||
<ItemGroup> | ||
|
||
<OctoPackWrittenFiles Include="@(FileWrites)" Exclude="$(IntermediateOutputPath)**\*" /> | ||
<OctoPackWrittenFiles Include="@(FileWritesShareable)" Exclude="$(IntermediateOutputPath)**\*" /> | ||
|
||
<OctoPackContentFiles Include="@(Content)" /> | ||
<OctoPackContentFiles Include="@(TypeScriptCompile)" /> | ||
</ItemGroup> | ||
|
||
<CreateOctoPackPackage | ||
NuSpecFileName="$(OctoPackNuSpecFileName)" | ||
AppendToPackageId="$(OctoPackAppendToPackageId)" | ||
AppendToVersion="$(OctoPackAppendToVersion)" | ||
ContentFiles="@(OctoPackContentFiles)" | ||
OutDir="$(OutDir)" | ||
ProjectDirectory="$(MSBuildProjectDirectory)" | ||
ProjectName="$(OctoPackProjectName)" | ||
PackageVersion="$(OctoPackPackageVersion)" | ||
PrimaryOutputAssembly="$(TargetPath)" | ||
ReleaseNotesFile="$(OctoPackReleaseNotesFile)" | ||
NuGetExePath="$(OctoPackNuGetExePath)" | ||
NuGetArguments="$(OctoPackNuGetArguments)" | ||
NuGetProperties="$(OctoPackNuGetProperties)" | ||
EnforceAddingFiles="$(OctoPackEnforceAddingFiles)" | ||
PublishPackagesToTeamCity="$(OctoPackPublishPackagesToTeamCity)" | ||
WrittenFiles="@(OctoPackWrittenFiles)" | ||
IncludeTypeScriptSourceFiles="$(OctoPackIncludeTypeScriptSourceFiles)" | ||
IgnoreNonRootScripts="$(OctoPackIgnoreNonRootScripts)" | ||
AppConfigFile="$(OctoPackAppConfigFileOverride)" | ||
> | ||
<Output TaskParameter="Packages" ItemName="OctoPackBuiltPackages" /> | ||
<Output TaskParameter="NuGetExePath" PropertyName="OctoPackNuGetExePath" /> | ||
</CreateOctoPackPackage> | ||
|
||
<Message Text="Built package: @(OctoPackBuiltPackages)" Importance="Low" /> | ||
<Message Text="NuGet.exe: $(OctoPackNuGetExePath)" Importance="Low" /> | ||
|
||
<Message Text="Publish to file share: $(OctoPackPublishPackageToFileShare)" Condition="'$(OctoPackPublishPackageToFileShare)' != ''" Importance="Normal" /> | ||
<Copy SourceFiles="@(OctoPackBuiltPackages)" DestinationFolder="$(OctoPackPublishPackageToFileShare)" Condition="'$(OctoPackPublishPackageToFileShare)' != ''" /> | ||
|
||
<Message Text="Publish to repository: $(OctoPackPublishPackageToHttp)" Condition="'$(OctoPackPublishPackageToHttp)' != ''" Importance="Normal" /> | ||
<Exec Command='"$(OctoPackNuGetExePath)" push "@(OctoPackBuiltPackages)" $(OctoPackPublishApiKey) -Source $(OctoPackPublishPackageToHttp) $(OctoPackNuGetPushProperties)' Condition="'$(OctoPackPublishPackageToHttp)' != ''" /> | ||
</Target> | ||
</Project> |