Skip to content

Commit

Permalink
Sync Directory.Build.targets
Browse files Browse the repository at this point in the history
  • Loading branch information
SyncFileContents authored and SyncFileContents committed Dec 27, 2024
1 parent 2b5ad57 commit 2a55ac8
Showing 1 changed file with 11 additions and 39 deletions.
50 changes: 11 additions & 39 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@

<IsPublishable Condition="$(IsExecutable)">true</IsPublishable>
<IsPackable Condition="$(IsLibrary)">true</IsPackable>
<AnalysisLevel Condition="$(IsTestProject) OR $(IsPrerelease)">latest-recommended</AnalysisLevel>
<NoWarn Condition="$(IsTestProject) OR $(IsPrerelease)">$(NoWarn);CS1591;</NoWarn>
<!-- CS1591: Missing XML comment for publicly visible type or member -->

<NoWarn Condition="$(IsTestProject)">$(NoWarn);CS1591;CA2225;IDE0022;IDE0058;CA1305;CA5394;</NoWarn>
<!-- CS1591: Missing XML comment for publicly visible type or member -->
<!-- CA2225: Operator overloads have named alternates -->
<!-- IDE0022: Use expression body for methods -->
<!-- IDE0058: Expression value is never used -->
Expand All @@ -46,42 +45,15 @@
<None Include="$(DirectoryBuildPropsFilePath)" Condition="Exists('$(DirectoryBuildPropsFilePath)')" Link="_Build\$(DirectoryBuildPropsFileName)" />
<None Include="$(DirectoryBuildTargetsFilePath)" Condition="Exists('$(DirectoryBuildTargetsFilePath)')" Link="_Build\$(DirectoryBuildTargetsFileName)" />

<None Include="$(AuthorsFilePath)" Condition="Exists('$(AuthorsFilePath)')" Pack="true" PackagePath="\" Link="_Data\$(AuthorsFileName)" />
<None Include="$(DescriptionFilePath)" Condition="Exists('$(DescriptionFilePath)')" Pack="true" PackagePath="\" Link="_Data\$(DescriptionFileName)" />
<None Include="$(LicenseFilePath)" Condition="Exists('$(LicenseFilePath)')" Pack="true" PackagePath="\" Link="_Data\$(LicenseFileName)" />
<None Include="$(ChangelogFilePath)" Condition="Exists('$(ChangelogFilePath)')" Pack="true" PackagePath="\" Link="_Data\$(ChangelogFileName)" />
<None Include="$(ReadmeFilePath)" Condition="Exists('$(ReadmeFilePath)')" Pack="true" PackagePath="\" Link="_Data\$(ReadmeFileName)" />
<None Include="$(VersionFilePath)" Condition="Exists('$(VersionFilePath)')" Pack="true" PackagePath="\" Link="_Data\$(VersionFileName)" />
<None Include="$(IconFilePath)" Condition="Exists('$(IconFilePath)')" Pack="true" PackagePath="\" Link="_Data\$(IconFileName)" />
<None Include="$(AuthorsFilePath)" Condition="Exists('$(AuthorsFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(AuthorsFileName)" />
<None Include="$(AuthorsUrlFilePath)" Condition="Exists('$(AuthorsUrlFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(AuthorsUrlFileName)" />
<None Include="$(ProjectUrlFilePath)" Condition="Exists('$(ProjectUrlFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(ProjectUrlFileName)" />
<None Include="$(DescriptionFilePath)" Condition="Exists('$(DescriptionFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(DescriptionFileName)" />
<None Include="$(LicenseFilePath)" Condition="Exists('$(LicenseFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(LicenseFileName)" />
<None Include="$(ChangelogFilePath)" Condition="Exists('$(ChangelogFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(ChangelogFileName)" />
<None Include="$(ReadmeFilePath)" Condition="Exists('$(ReadmeFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(ReadmeFileName)" />
<None Include="$(VersionFilePath)" Condition="Exists('$(VersionFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(VersionFileName)" />
<None Include="$(IconFilePath)" Condition="Exists('$(IconFilePath)')" Pack="true" PackagePath="\" Link="_MetaData\$(IconFileName)" />
</ItemGroup>

<Target Name="GenerateMITLicense" BeforeTargets="Build">
<WriteLinesToFile
File="$(LicenseFilePath)"
Lines='MIT License
$(Copyright)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the &quot;Software&quot;), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'
Overwrite="true"
Encoding="UTF-8" />
</Target>

</Project>

0 comments on commit 2a55ac8

Please sign in to comment.