Skip to content

Commit

Permalink
moved nuspec and build files, added targets file
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnie-fialok committed Jul 3, 2024
1 parent 70c2df8 commit 3ff95b1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<!--
- The major and minor versions should match the Roslyn API version,
- and the major/minor/build versions should match the NuGet package version (NuGet is x.y.z only)
- Revision should be incremented whenever you want to publish a new version.
-->
<ShortVersion Condition=" '$(TagVersion)' == '' ">3.7.2</ShortVersion>
<ShortVersion Condition=" '$(TagVersion)' != '' ">$(TagVersion.Split('-', 2)[0])</ShortVersion>
<VersionSuffix Condition=" '$(TagVersion)' != '' ">
$(TagVersion.Substring($(ShortVersion.Length)))</VersionSuffix>

<Version Condition=" '$(Version)' == '' and '$(GITHUB_RUN_NUMBER)' != ''">
$(ShortVersion).$(GITHUB_RUN_NUMBER)</Version>
<Version Condition=" '$(Version)' == '' and '$(GITHUB_RUN_NUMBER)' == ''">$(ShortVersion).0</Version>
</PropertyGroup>

<Import Project="..\build\Version.props" />
Expand Down
15 changes: 15 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(NuspecFile)' != ''">
<IsPackable>true</IsPackable>
<NuspecProperties>
id=$(PackageId);
version=$(ShortVersion)$(VersionSuffix);
company=$(Company);
copyright=$(Copyright);
commitid=$(CommitID);
</NuspecProperties>
</PropertyGroup>
</Project>
File renamed without changes.

0 comments on commit 3ff95b1

Please sign in to comment.