Skip to content

Commit 57749d4

Browse files
committed
support GetPackageVersionDependsOn to ensure project-to-project dependencies get their package versions set
1 parent 25c7711 commit 57749d4

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.1.3] - 2022.03.20
4+
5+
### Fixed
6+
7+
- Support supplying package versions for project-to-project references.
8+
39
## [0.1.2] - 2022.02.13
410

511
### Added

src/Ionide.KeepAChangelog.Tasks/Ionide.KeepAChangelog.Tasks.fsproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<DebugType>embedded</DebugType>
99
<IsPackable>true</IsPackable>
1010
<Description>MSBuild Tasks and Targets that set your Assembly Version, Package Version, and Package Release Notes from your KeepAChangelog-compatible Changelogs.</Description>
11-
<Version>0.1.2</Version>
11+
<Version>0.1.3</Version>
1212
<PackageReleaseNotes>
13-
### Added
13+
### Fixed
1414

15-
- Now supports multiTargeted builds and packs by the addition of the buildMultiTargeting folder. The outer build is hooked at the GenerateNuspec target.
15+
- Support supplying package versions for project-to-project references.
1616
</PackageReleaseNotes>
1717
</PropertyGroup>
1818

src/Ionide.KeepAChangelog.Tasks/build/Ionide.KeepAChangelog.Tasks.targets

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)../lib/netstandard2.0/Ionide.KeepAChangelog.Tasks.dll" TaskName="Ionide.KeepAChangelog.Tasks.ParseChangeLogs" />
2+
<UsingTask
3+
AssemblyFile="$(MSBuildThisFileDirectory)../lib/netstandard2.0/Ionide.KeepAChangelog.Tasks.dll"
4+
TaskName="Ionide.KeepAChangelog.Tasks.ParseChangeLogs" />
35

46
<PropertyGroup>
57
<!-- For single-target builds (or inner builds of a multi-targeted build) we must run before any of the normal versioning-related targets are run.
@@ -8,26 +10,47 @@
810
SetVersionFromChangelog;
911
$(PrepareForBuildDependsOn)
1012
</PrepareForBuildDependsOn>
13+
<!-- For project-to-project dependencies, GetPackageVersionDependsOn can be used as a well-known hook to ensure the project's versioning properties are run. -->
14+
<GetPackageVersionDependsOn>
15+
$(GetPackageVersionDependsOn);
16+
SetVersionFromChangelog
17+
</GetPackageVersionDependsOn>
1118
</PropertyGroup>
1219

13-
<Target Name="GetChangelogVersion" Condition="'$(ChangelogFile)' != '' and Exists('$(ChangelogFile)')" Inputs="$(ChangelogFile)" Outputs="UnreleasedChangelog;CurrentReleaseChangelog;AllReleasedChangelogslLatestReleaseNotes">
20+
<Target
21+
Name="GetChangelogVersion"
22+
Condition="'$(ChangelogFile)' != '' and Exists('$(ChangelogFile)')"
23+
Inputs="$(ChangelogFile)"
24+
Outputs="UnreleasedChangelog;CurrentReleaseChangelog;AllReleasedChangelogslLatestReleaseNotes">
1425
<Ionide.KeepAChangelog.Tasks.ParseChangeLogs ChangelogFile="$(ChangelogFile)">
15-
<Output TaskParameter="UnreleasedChangelog" ItemName="UnreleasedChangelog" />
16-
<Output TaskParameter="CurrentReleaseChangelog" ItemName="CurrentReleaseChangelog" />
17-
<Output TaskParameter="AllReleasedChangelogs" ItemName="AllReleasedChangelogs" />
18-
<Output TaskParameter="LatestReleaseNotes" ItemName="LatestReleaseNotes" />
26+
<Output
27+
TaskParameter="UnreleasedChangelog"
28+
ItemName="UnreleasedChangelog" />
29+
<Output
30+
TaskParameter="CurrentReleaseChangelog"
31+
ItemName="CurrentReleaseChangelog" />
32+
<Output
33+
TaskParameter="AllReleasedChangelogs"
34+
ItemName="AllReleasedChangelogs" />
35+
<Output
36+
TaskParameter="LatestReleaseNotes"
37+
ItemName="LatestReleaseNotes" />
1938
</Ionide.KeepAChangelog.Tasks.ParseChangeLogs>
2039
</Target>
2140

22-
<Target Name="SetVersionFromChangelog" DependsOnTargets="GetChangelogVersion">
41+
<Target
42+
Name="SetVersionFromChangelog"
43+
DependsOnTargets="GetChangelogVersion">
2344
<PropertyGroup Condition="'@(CurrentReleaseChangelog)' != ''">
2445
<Version>%(CurrentReleaseChangelog.Identity)</Version>
2546
<PackageVersion>%(CurrentReleaseChangelog.Identity)</PackageVersion>
2647
<PackageReleaseNotes>@(LatestReleaseNotes)</PackageReleaseNotes>
2748
</PropertyGroup>
2849

2950
<ItemGroup Condition="'@(CurrentReleaseChangelog)' != '' and '$(GenerateAssemblyInfo)' == 'true'">
30-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(GenerateRepositoryUrlAttribute)' == 'true' and ('$(RepositoryUrl)' != '' or '$(PublishRepositoryUrl)' == 'true')">
51+
<AssemblyAttribute
52+
Include="System.Reflection.AssemblyMetadataAttribute"
53+
Condition="'$(GenerateRepositoryUrlAttribute)' == 'true' and ('$(RepositoryUrl)' != '' or '$(PublishRepositoryUrl)' == 'true')">
3154
<_Parameter1>BuildDate</_Parameter1>
3255
<_Parameter2>%(CurrentReleaseChangelog.Date)</_Parameter2>
3356
</AssemblyAttribute>

src/Ionide.KeepAChangelog/Ionide.KeepAChangelog.fsproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
<DebugType>embedded</DebugType>
77
<IsPackable>true</IsPackable>
88
<Description>A self-contained parser for the KeepAChangelog format.</Description>
9-
<Version>0.1.2</Version>
9+
<Version>0.1.3</Version>
1010
<PackageReleaseNotes>
11-
### Added
11+
### Fixed
1212

13-
- Now supports multiTargeted builds and packs by the addition of the buildMultiTargeting folder. The outer build is hooked at the GenerateNuspec target.</PackageReleaseNotes>
13+
- Support supplying package versions for project-to-project references.
14+
</PackageReleaseNotes>
1415
</PropertyGroup>
1516

1617
<ItemGroup>

0 commit comments

Comments
 (0)