Skip to content

Commit d2094fa

Browse files
committed
FIX: Better handling of the changelog regex, and add the prefix V for the versions
1 parent fc318ad commit d2094fa

File tree

5 files changed

+63
-56
lines changed

5 files changed

+63
-56
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
### 1.0.0-rc1 - 08 Auguest 2025
1+
### v1.0.0-preview.1 - 08 August 2025
22
* Modifications to CustomAPI definitions to align better with data
33

4-
### 0.0.5 - 5 May 2025
4+
### v0.0.5 - 5 May 2025
55
* Add icon to package
66
* Sign the assembly
77

8-
### 0.0.4 - 29 April 2025
8+
### v0.0.4 - 29 April 2025
99
* Add AsyncAutoDelete field, and documentation of properties on the config interfaces
1010

11-
### 0.0.3 - 29 April 2025
11+
### v0.0.3 - 29 April 2025
1212
* Remove concrete classes and cleanup namespaces. XrmPluginCore.Abstractions now only contains interfaces and enums
1313

14-
### 0.0.2 - 25 April 2025
14+
### v0.0.2 - 25 April 2025
1515
* Fixes to project file so version is picked up correctly
1616

17-
### 0.0.1 - 14 March 2025
17+
### v0.0.1 - 14 March 2025
1818
* Initial release of XrmPluginCore.Abstractions.
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
6-
<PackageId>Delegate.XrmPluginCore.Abstractions</PackageId>
7-
<Title>Delegate.XrmPluginCore.Abstractions</Title>
8-
<Company>Delegate A/S</Company>
9-
<Copyright>2025 Delegate A/S</Copyright>
10-
<PackageProjectUrl>https://github.com/delegateas/XrmPluginCore</PackageProjectUrl>
11-
<Description>Abstractions and shared Enums for the DG.XrmPluginCore package</Description>
12-
<PackageReadmeFile>README.md</PackageReadmeFile>
13-
<RepositoryUrl>https://github.com/delegateas/XrmPluginCore</RepositoryUrl>
14-
<RepositoryType>git</RepositoryType>
15-
<PackageTags>xrm,crm,dataverse,daxif,delegate,xrmmockup</PackageTags>
16-
<PackageLicenseFile>LICENSE</PackageLicenseFile>
17-
<IncludeSymbols>True</IncludeSymbols>
18-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
19-
<RootNamespace>DG.XrmPluginCore</RootNamespace>
20-
<SignAssembly>True</SignAssembly>
21-
<AssemblyOriginatorKeyFile>../resources/delegate.snk</AssemblyOriginatorKeyFile>
22-
<PackageIcon>delegate.png</PackageIcon>
23-
</PropertyGroup>
24-
<ItemGroup>
25-
<None Include="..\LICENSE">
26-
<Pack>True</Pack>
27-
<PackagePath>\</PackagePath>
28-
</None>
29-
<None Include="..\README.md">
30-
<Pack>True</Pack>
31-
<PackagePath>\</PackagePath>
32-
</None>
33-
<None Include="..\resources\delegate.png">
34-
<Pack>True</Pack>
35-
<PackagePath>\</PackagePath>
36-
</None>
37-
</ItemGroup>
38-
</Project>
2+
<PropertyGroup>
3+
<TargetFramework>netstandard2.0</TargetFramework>
4+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
5+
<PackageId>Delegate.XrmPluginCore.Abstractions</PackageId>
6+
<Title>Delegate.XrmPluginCore.Abstractions</Title>
7+
<Company>Delegate A/S</Company>
8+
<Copyright>2025 Delegate A/S</Copyright>
9+
<PackageProjectUrl>https://github.com/delegateas/XrmPluginCore</PackageProjectUrl>
10+
<Description>Abstractions and shared Enums for the DG.XrmPluginCore package</Description>
11+
<PackageReadmeFile>README.md</PackageReadmeFile>
12+
<RepositoryUrl>https://github.com/delegateas/XrmPluginCore</RepositoryUrl>
13+
<RepositoryType>git</RepositoryType>
14+
<PackageTags>xrm,crm,dataverse,daxif,delegate,xrmmockup</PackageTags>
15+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
16+
<IncludeSymbols>True</IncludeSymbols>
17+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
18+
<RootNamespace>DG.XrmPluginCore</RootNamespace>
19+
<SignAssembly>True</SignAssembly>
20+
<AssemblyOriginatorKeyFile>../resources/delegate.snk</AssemblyOriginatorKeyFile>
21+
<PackageIcon>delegate.png</PackageIcon>
22+
<Version>1.0.0-local</Version>
23+
</PropertyGroup>
24+
<ItemGroup>
25+
<None Include="..\LICENSE">
26+
<Pack>True</Pack>
27+
<PackagePath>\</PackagePath>
28+
</None>
29+
<None Include="..\README.md">
30+
<Pack>True</Pack>
31+
<PackagePath>\</PackagePath>
32+
</None>
33+
<None Include="..\resources\delegate.png">
34+
<Pack>True</Pack>
35+
<PackagePath>\</PackagePath>
36+
</None>
37+
</ItemGroup>
38+
</Project>

DG.XrmPluginCore/CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
### 1.0.0-rc1 - 08 August 2025
1+
### v1.0.0-preview.1 - 08 August 2025
22
* Modifications to CustomAPI definitions to align better with data
33

4-
### 0.0.7 - 5 May 2025
4+
### v0.0.7 - 5 May 2025
55
* Add icon to package
66
* Sign the assembly
77

8-
### 0.0.6 - 1 May 2025
8+
### v0.0.6 - 1 May 2025
99
* Fix: Mark base classes (CustomApi and Plugin) as abstract
1010

11-
### 0.0.5 - 29 April 2025
11+
### v0.0.5 - 29 April 2025
1212
* Add AsyncAutoDelete field to PluginConfig
1313

14-
### 0.0.4 - 29 April 2025
14+
### v0.0.4 - 29 April 2025
1515
* Fix: String formatting had invalid indexes
1616

17-
### 0.0.3 - 29 April 2025
17+
### v0.0.3 - 29 April 2025
1818
* Clean-up and move concrete classes to XrmPluginCore from XrmPluginCore.Abstractions
1919

20-
### 0.0.2 - 25 April 2025
20+
### v0.0.2 - 25 April 2025
2121
* Fixes to project file so version and dependencies are picked up correctly
2222

23-
### 0.0.1 - 14 March 2025
23+
### v0.0.1 - 14 March 2025
2424
* Initial release of XrmPluginCore.

DG.XrmPluginCore/DG.XrmPluginCore.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<PackageIcon>delegate.png</PackageIcon>
1919
<SignAssembly>True</SignAssembly>
2020
<AssemblyOriginatorKeyFile>../resources/delegate.snk</AssemblyOriginatorKeyFile>
21+
<Version>1.0.0-local</Version>
2122
</PropertyGroup>
2223
<ItemGroup>
2324
<None Include="..\LICENSE">

scripts/Set-VersionFromChangelog.ps1

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ param(
55
)
66

77
$changelog = Get-Content $ChangelogPath
8-
# Match lines like: ### v1.0.0-rc1 - xx xxxx 2025
9-
$versionLine = $changelog | Where-Object { $_ -match '^### v([0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9]+)?)' } | Select-Object -First 1
10-
if ($versionLine -match '^### v([0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9]+)?)') {
8+
# Match lines like: ### v1.0.0-rc.1 - xx xxxx 2025
9+
10+
$regex = '^### v([0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9\-\.]+)?)'
11+
$resolved = Resolve-Path $CsprojPath
12+
13+
$versionLine = $changelog | Where-Object { $_ -match $regex } | Select-Object -First 1
14+
if ($versionLine -match $regex) {
1115
$version = $matches[1]
1216
Write-Host "Detected version: $version"
13-
[xml]$xml = Get-Content $CsprojPath
17+
[xml]$xml = Get-Content $resolved
18+
1419
$propertyGroup = $xml.Project.PropertyGroup | Where-Object { $_.Version -or $_.OutputType }
1520
if (-not $propertyGroup.Version) {
1621
$versionElement = $xml.CreateElement('Version')
@@ -19,7 +24,8 @@ if ($versionLine -match '^### v([0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9]+)?)') {
1924
} else {
2025
$propertyGroup.Version = $version
2126
}
22-
$xml.Save($CsprojPath)
27+
28+
$xml.Save($resolved)
2329
Write-Host "Updated $CsprojPath with version $version"
2430
} else {
2531
Write-Error 'No version found in CHANGELOG.md'

0 commit comments

Comments
 (0)