Skip to content

Commit 34d5b44

Browse files
committed
Fix bumping version of nanoFramework
1 parent 38e1415 commit 34d5b44

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

Build/set-version-UnitsNet.ps1

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,24 @@ $root = Resolve-Path "$PSScriptRoot\.."
5353
$paramSet = $PsCmdlet.ParameterSetName
5454
$projFile = "$root\UnitsNet\UnitsNet.csproj"
5555
$numberExtensionsProjFile = "$root\UnitsNet.NumberExtensions\UnitsNet.NumberExtensions.csproj"
56+
$nanoFrameworkNuspecGeneratorFile = "$root\CodeGen\Generators\NanoFrameworkGen\NuspecGenerator.cs"
5657
$winrtAssemblyInfoFile = "$root\UnitsNet.WindowsRuntimeComponent\Properties\AssemblyInfo.cs"
5758
$winrtNuspecFile = "$root\UnitsNet.WindowsRuntimeComponent\UnitsNet.WindowsRuntimeComponent.nuspec"
5859
$versionFiles = @($projFile, $numberExtensionsProjFile, $winrtAssemblyInfoFile, $winrtNuspecFile)
5960

6061
# Use UnitsNet.Common.props version as base if bumping major/minor/patch
6162
$newVersion = Get-NewProjectVersion $projFile $paramSet $setVersion $bumpVersion
6263

63-
# # Update project files
64+
# Update project files
6465
Set-ProjectVersion $projFile $newVersion
6566
Set-ProjectVersion $numberExtensionsProjFile $newVersion
6667

67-
# # Update AssemblyInfo.cs files
68+
# Update AssemblyInfo.cs files
6869
Set-AssemblyInfoVersion $winrtAssemblyInfoFile $newVersion
6970

70-
# # Update .nuspec files
71+
# Update .nuspec files
7172
Set-NuspecVersion $winrtNuspecFile $newVersion
72-
73-
# # Update .nuspec files for nanoFramework
74-
Get-ChildItem -Path "$root\UnitsNet.NanoFramework\GeneratedCode" -Include '*.nuspec' -Recurse |
75-
Foreach-object {
76-
Set-NuspecVersion $_.FullName $newVersion
77-
$versionFiles += $_.FullName
78-
}
73+
Set-NuspecVersion $nanoFrameworkNuspecGeneratorFile $newVersion
7974

8075
# Git commit and tag
8176
Invoke-CommitVersionBump @("UnitsNet") $versionFiles $newVersion

CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Text;
44
using CodeGen.JsonTypes;
@@ -8,7 +8,7 @@ namespace CodeGen.Generators.NanoFrameworkGen
88
class NuspecGenerator : GeneratorBase
99
{
1010
private readonly Quantity _quantity;
11-
private string _mathNuGetVersion;
11+
private readonly string _mathNuGetVersion;
1212

1313
public NuspecGenerator(Quantity quantity, string mathNuGetVersion)
1414
{

0 commit comments

Comments
 (0)