Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Allow ManPagesDir override, handle error better (consolidation) #8767

Merged
merged 2 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pkg/packaging/deb/package.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<DebPackageVersion>$(HostPackageVersion)</DebPackageVersion>
<InputRoot>$(SharedHostPublishRoot)</InputRoot>
<DebFile>$(SharedHostInstallerFile)</DebFile>
<ManPagesDir>$(RepoRoot)Documentation/manpages</ManPagesDir>
<ManPagesDir Condition="'$(ManPagesDir)' == ''">$(RepoRoot)Documentation/manpages</ManPagesDir>
<ConfigJsonName>dotnet-sharedhost-debian_config.json</ConfigJsonName>
<ConfigJsonFile>$(debPackaginfConfigPath)$(ConfigJsonName)</ConfigJsonFile>
<debIntermediatesDir>$(PackagesIntermediateDir)$(DebPackageName)/$(DebPackageVersion)</debIntermediatesDir>
Expand Down
14 changes: 13 additions & 1 deletion src/pkg/packaging/rpm/package.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<RpmPackageVersion>$(HostPackageVersion)</RpmPackageVersion>
<InputRoot>$(SharedHostPublishRoot)</InputRoot>
<RpmFile>$(SharedHostInstallerFile)</RpmFile>
<ManPagesDir>$(RepoRoot)Documentation/manpages</ManPagesDir>
<ManPagesDir Condition="'$(ManPagesDir)' == ''">$(RepoRoot)Documentation/manpages</ManPagesDir>
<ConfigJsonName>dotnet-sharedhost-rpm_config.json</ConfigJsonName>
<ConfigJsonFile>$(rpmPackagingConfigPath)$(ConfigJsonName)</ConfigJsonFile>
<RpmIntermediatesDir>$(PackagesIntermediateDir)$(RpmPackageName)/$(RpmPackageVersion)</RpmIntermediatesDir>
Expand Down Expand Up @@ -62,6 +62,18 @@
<SHTemplatesFiles Include="$(TemplatesDir)/**/*" />
</ItemGroup>

<!--
Detect no files being found and emit an early error to avoid breaking the build in a way that
prevents binlog publish in the official build.

We create a temporary symlink before calling FPM, and if FPM fails due to not finding some of
these files, the build terminates before deleting the symlink. The symlink causes the 'find'
command to fail. AzDO uses 'find' to find the binlogs, so we get into a bad state.
-->
<Error Condition="'@(SHFiles)' == ''" Text="No SHFiles found." />
<Error Condition="'@(SHManpages)' == ''" Text="No SHManpages found." />
<Error Condition="'@(SHTemplatesFiles)' == ''" Text="No SHTemplatesFiles found." />

<Copy SourceFiles="@(SHFiles)" DestinationFiles="@(SHFiles->'$(rpmLayoutUsrShareDotnetDir)/%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(SHManpages)" DestinationFiles="@(SHManpages->'$(rpmLayoutDocs)/%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(SHTemplatesFiles)" DestinationFiles="@(SHTemplatesFiles->'$(rpmLayoutTemplates)/%(RecursiveDir)%(Filename)%(Extension)')" />
Expand Down