Skip to content

Commit

Permalink
- Package Filter
Browse files Browse the repository at this point in the history
- Removed no more used variables and items
  • Loading branch information
derjabkin committed May 5, 2016
1 parent 9a2c04c commit 12c6360
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 3 additions & 7 deletions Buildeploy.targets
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@
</PropertyGroup>

<ItemGroup>
<LibLocalizationItems Include="$(LibPath)\%(LocalizationCulture.FileName)\*.dll"/>
<AdditionalLocalizationItems Include="$(LocalizationFilesPath)\%(LocalizationCulture.FileName)\*.dll"/>
<LocalizationItems Include="$(CompileOutput)\%(LocalizationCulture.FileName)\*.dll"/>
</ItemGroup>
<MakeDir Directories="$(TempClientRedist)\%(LocalizationCulture.FileName)"/>

<Copy SourceFiles="@(LibLocalizationItems)" DestinationFolder="$(TempLocalizationFiles)\%(LocalizationCulture.FileName)" />

<Copy SourceFiles="@(LocalizationItems)" DestinationFolder="$(TempLocalizationFiles)\%(LocalizationCulture.FileName)"/>
<Copy SourceFiles="@(AdditionalLocalizationItems)" DestinationFolder="$(TempLocalizationFiles)\%(LocalizationCulture.FileName)"/>
</Target>
Expand Down Expand Up @@ -216,7 +215,7 @@
UseAssemblyProductName = "%(OctoConfig.UseAssemblyProductName)"
VersionTag="%(OctoConfig.VersionTag)"
PackageFilter="%(OctoConfig.PackageFilter)"
PackageFilterRefs="@(WebSiteDependency)"
PackageFilterRefs="@(WebSiteDependency);@(ClientRedistFile)"
/>
<Copy SourceFiles="$(VersionRedistRoot)\ClickOnce\$(ClickOnceFilePrefix)%(OctoConfig.Identity)_$(SemVersion).zip"
DestinationFolder="%(OctoConfig.DeployCopyPath)"
Expand Down Expand Up @@ -255,7 +254,7 @@
Command="$(OctoExePath) create-release --server=%(OctoConfig.OctopusServerUrl) --apikey=%(OctoConfig.OctopusApiKey) -project=%(OctoConfig.OctopusProject) --version $(SemVersion) --packageversion $(SemVersion) --releasenotes &quot;%(OctoConfig.ReleaseNotes)&quot; %(OctoConfig.CreateReleaseOptions)"
Condition="%(OctoConfig.OctopusProject)!=''"/>
<Exec
Command="$(OctoExePath) deploy-release --server=%(OctoConfig.OctopusServerUrl) --apikey=%(OctoConfig.OctopusApiKey) -project=%(OctoConfig.OctopusProject) --deployto=%(OctoConfig.DeployEnviroment) --version $(SemVersion) --waitfordeployment"
Command="$(OctoExePath) deploy-release --server=%(OctoConfig.OctopusServerUrl) --apikey=%(OctoConfig.OctopusApiKey) -project=%(OctoConfig.OctopusProject) --deployto=%(OctoConfig.DeployEnviroment) --version $(SemVersion) %(OctoConfig.DeployReleaseOptions) --waitfordeployment"
IgnoreStandardErrorWarningFormat="True"
Condition="%(OctoConfig.DeployEnviroment)!=''"/>
</Target>
Expand Down Expand Up @@ -330,9 +329,6 @@

<MakeDir Directories="$(TempRedistRoot)\Client"/>

<NUnit Assemblies="@(NUnitAssembly)" ToolPath="$(LibPath)" Condition="@(NUnitAssembly)!=''" WorkingDirectory="bin\$(RedistConfiguration)"/>


<MSTest
MSTestExe="$(MSTestExe)"
Assemblies="@(MSTestAssembly)"
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a32a96b5-dfeb-4b52-9371-92ccf863a3b3")]
[assembly: AssemblyVersion("1.0.58.0")]
[assembly: AssemblyVersion("1.0.63.0")]
11 changes: 7 additions & 4 deletions Tasks/PackageTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ private ITaskItem GetPackageFilterRef(ITaskItem item)
}
private bool MatchFilter(ITaskItem fileItem)
{
if (fileItem == null) return false;
fileItem = GetPackageFilterRef(fileItem);
if (fileItem == null) return true;
string fileFilter = fileItem.GetMetadata(nameof(PackageFilter));
if (string.IsNullOrWhiteSpace(fileFilter))
return true;
Expand All @@ -155,10 +156,12 @@ private bool CompressFiles(IList<PackageFileInfo> additionalFiles)
{
targetDir = "ClickOnce";
CompressFileSet(package, WebsiteBasePath, null, WebsiteFiles
.Where(f => MatchFilter(GetPackageFilterRef(f)))
.Where(MatchFilter)
.Select(f => f.ItemSpec), false);
}
CompressFileSet(package, BasePath, targetDir, Files.Where(MatchFilter).Select(f => f.ItemSpec), CombineWithWebsite);
CompressFileSet(package, BasePath, targetDir, Files
.Where(MatchFilter)
.Select(f => f.ItemSpec), CombineWithWebsite);

if (additionalFiles != null)
{
Expand Down Expand Up @@ -279,7 +282,7 @@ private ApplicationManifest CreateApplicationManifest(string entryPoint, out str

Dictionary<string, AssemblyIdentity> addedIdentities = new Dictionary<string, AssemblyIdentity>();
string basePath = Path.GetFullPath(BasePath);
foreach (var taskItem in Files)
foreach (var taskItem in Files.Where(MatchFilter))
{
string filePath = taskItem.GetMetadata("FullPath");
string targetPath = null;
Expand Down
1 change: 1 addition & 0 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@

<MakeDir Directories="bin\nuget"/>
<Exec ContinueOnError="false" Command="$(NuGetTool) pack nuspec\Buildeploy.nuspec -BasePath $(MSBuildProjectDirectory) -OutputDirectory bin\NuGet -Version $(Version) -Properties SourceDir=bin\debug"/>
<Exec ContinueOnError="false" Command="$(NuGetTool) push bin\Nuget\buildeploy.net.$(Version).nupkg $(ApiKey)" Condition="$(ApiKey)!=''"/>
</Target>
</Project>

0 comments on commit 12c6360

Please sign in to comment.