-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ionide/support-multitargeted-builds
- Loading branch information
Showing
6 changed files
with
77 additions
and
23 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
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
23 changes: 10 additions & 13 deletions
23
src/Ionide.KeepAChangelog.Tasks/build/Ionide.KeepAChangelog.Tasks.targets
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
5 changes: 5 additions & 0 deletions
5
src/Ionide.KeepAChangelog.Tasks/buildMultiTargeting/Ionide.KeepAChangelog.Tasks.props
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,5 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ChangelogFile Condition="'$(ChangelogFile)' == ''">CHANGELOG.md</ChangelogFile> | ||
</PropertyGroup> | ||
</Project> |
39 changes: 39 additions & 0 deletions
39
src/Ionide.KeepAChangelog.Tasks/buildMultiTargeting/Ionide.KeepAChangelog.Tasks.targets
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,39 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)../lib/netstandard2.0/Ionide.KeepAChangelog.Tasks.dll" TaskName="Ionide.KeepAChangelog.Tasks.ParseChangeLogs" /> | ||
|
||
<PropertyGroup> | ||
<!-- For multitargeting builds, the 'outer' build is used for things like packing, and so never hits the `PrepareForBuildDependsOn` condition group | ||
That works for 'inner', TFM-specific builds. Therefore we need another hook. Luckily, for packaging we can be much less restrictive on | ||
_when_ the versioning information is collected, because assemblies don't need to be stamped, so this can just happen sometime before | ||
the GenerateNuspec task. --> | ||
<GenerateNuspecDependsOn> | ||
SetVersionFromChangelog; | ||
$(GenerateNuspecDependsOn) | ||
</GenerateNuspecDependsOn> | ||
</PropertyGroup> | ||
|
||
<Target Name="GetChangelogVersion" Condition="'$(ChangelogFile)' != '' and Exists('$(ChangelogFile)')" Inputs="$(ChangelogFile)" Outputs="UnreleasedChangelog;CurrentReleaseChangelog;AllReleasedChangelogslLatestReleaseNotes"> | ||
<Ionide.KeepAChangelog.Tasks.ParseChangeLogs ChangelogFile="$(ChangelogFile)"> | ||
<Output TaskParameter="UnreleasedChangelog" ItemName="UnreleasedChangelog" /> | ||
<Output TaskParameter="CurrentReleaseChangelog" ItemName="CurrentReleaseChangelog" /> | ||
<Output TaskParameter="AllReleasedChangelogs" ItemName="AllReleasedChangelogs" /> | ||
<Output TaskParameter="LatestReleaseNotes" ItemName="LatestReleaseNotes" /> | ||
</Ionide.KeepAChangelog.Tasks.ParseChangeLogs> | ||
</Target> | ||
|
||
<Target Name="SetVersionFromChangelog" DependsOnTargets="GetChangelogVersion"> | ||
<PropertyGroup Condition="'@(CurrentReleaseChangelog)' != ''"> | ||
<Version>%(CurrentReleaseChangelog.Identity)</Version> | ||
<PackageVersion>%(CurrentReleaseChangelog.Identity)</PackageVersion> | ||
<PackageReleaseNotes>@(LatestReleaseNotes)</PackageReleaseNotes> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'@(CurrentReleaseChangelog)' != '' and '$(GenerateAssemblyInfo)' == 'true'"> | ||
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(GenerateRepositoryUrlAttribute)' == 'true' and ('$(RepositoryUrl)' != '' or '$(PublishRepositoryUrl)' == 'true')"> | ||
<_Parameter1>BuildDate</_Parameter1> | ||
<_Parameter2>%(CurrentReleaseChangelog.Date)</_Parameter2> | ||
</AssemblyAttribute> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
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