Skip to content

Commit fd4703e

Browse files
authored
Merge pull request #181 from apache/Feature/181-automate-version-bumps
automate version bumps
2 parents 56edca6 + 24dee13 commit fd4703e

File tree

9 files changed

+382
-344
lines changed

9 files changed

+382
-344
lines changed

doc/MailTemplate.Announce.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
Subject: [ANNOUNCE] Apache log4net 3.1.0 released
3+
4+
Hi,
5+
6+
the Apache log4net team is pleased to announce the 3.1.0 release.
7+
For further information (support, download, etc.) see
8+
- https://logging.apache.org/log4net/release/release-notes.html
9+
- https://github.com/apache/logging-log4net/releases/tag/rel%2F3.1.0
10+
- https://www.nuget.org/packages/log4net/3.1.0
11+
12+
== Release Notes
13+

doc/MailTemplate.Result.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
2-
Subject: [RESULT][VOTE] Release Apache Log4net 3.0.0
2+
Subject: [RESULT][VOTE] Release Apache Log4net 3.1.0
33

44
Hi,
55

6-
with +3 binding votes (Davyd, Volkan and myself), apache log4net 3.0.0 is released and available:
7-
https://github.com/apache/logging-log4net/releases/tag/rel%2F3.0.0
6+
with +3 binding votes (Davyd, Volkan and myself), apache log4net 3.1.0 is released and available:
7+
https://github.com/apache/logging-log4net/releases/tag/rel%2F3.1.0
88

99
Source snapshot at:
10-
https://downloads.apache.org/logging/log4net/source/apache-log4net-source-3.0.0.zip
10+
https://downloads.apache.org/logging/log4net/source/apache-log4net-source-3.1.0.zip
1111

1212
Thanks
1313

1414
---------------------------------------------------------------------------------------------------
15-
This is a vote to release the Apache Log4net 3.0.0.
15+
This is a vote to release the Apache Log4net 3.1.0.
1616

1717
...

doc/MailTemplate.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
2-
Subject: [VOTE] Release Apache Log4net 3.0.0
2+
Subject: [VOTE] Release Apache Log4net 3.1.0
33

4-
This is a vote to release the Apache Log4net 3.0.0.
4+
This is a vote to release the Apache Log4net 3.1.0.
55

66
Website: https://logging.staged.apache.org/log4net/release/release-notes.html
77
GitHub: https://github.com/apache/logging-log4net
8-
GitHub release (pre-release): https://github.com/apache/logging-log4net/releases/tag/rc/3.0.0-rc1
8+
GitHub release (pre-release): https://github.com/apache/logging-log4net/releases/tag/rc/3.1.0-rc1
99
Commit: <todo insert>
1010
Distribution: https://dist.apache.org/repos/dist/dev/logging/log4net
1111
Signing key: 0x7D24496A230E29D6349A99EF583E491578F02D5D

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "log4net",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"description": "Log4Net is a logging framework for .NET",
55
"scripts": {
66
"test": "run-s clean-build test-dotnet run-dotnet-core-tests",

pom.xml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<groupId>log4net</groupId>
2222
<artifactId>apache-log4net</artifactId>
2323
<packaging>pom</packaging>
24-
<version>3.0.0</version>
24+
<version>3.1.0</version>
2525
<name>Apache log4net</name>
2626
<description>Logging framework for Microsoft .NET Framework.</description>
2727
<url>http://logging.apache.org/log4net/</url>
@@ -72,7 +72,6 @@
7272
</plugin>
7373
</plugins>
7474
</build>
75-
7675
<reporting>
7776
<plugins>
7877
<plugin>
@@ -89,7 +88,7 @@
8988
<artifactId>apache-rat-plugin</artifactId>
9089
<version>0.12</version>
9190
<configuration>
92-
<excludesFile>${basedir}/rat.excludesFile</excludesFile>
91+
<excludesFile>${basedir}/rat.excludesFile</excludesFile>
9392
</configuration>
9493
</plugin>
9594
<plugin>
@@ -99,7 +98,7 @@
9998
<reportSets>
10099
<reportSet>
101100
<reports>
102-
<report>cim</report>
101+
<report>cim</report>
103102
<report>scm</report>
104103
<report>license</report>
105104
<report>project-team</report>
@@ -109,7 +108,6 @@
109108
</plugin>
110109
</plugins>
111110
</reporting>
112-
113111
<developers>
114112
<developer>
115113
<name>Davyd McColl</name>
@@ -148,7 +146,6 @@
148146
<id>dpsenner</id>
149147
</developer>
150148
</developers>
151-
152149
<contributors>
153150
<contributor>
154151
<name>Erik Mavrinac</name>
@@ -187,14 +184,12 @@
187184
<name>Jarrod Alexander</name>
188185
</contributor>
189186
</contributors>
190-
191187
<dependencies>
192188
</dependencies>
193-
194189
<distributionManagement>
195190
<site>
196191
<id>logging.site</id>
197192
<url>file:///${user.dir}/target/site-deploy</url>
198193
</site>
199-
</distributionManagement>
200-
</project>
194+
</distributionManagement>
195+
</project>

scripts/update-version.ps1

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Param (
2+
[Parameter(Mandatory = $true)]
3+
[ValidateNotNullOrEmpty()]
4+
[string]$OldVersion,
5+
[Parameter(Mandatory = $true)]
6+
[ValidateNotNullOrEmpty()]
7+
[string]$NewVersion
8+
)
9+
10+
Set-StrictMode -Version Latest
11+
$ErrorActionPreference = 'Stop'
12+
13+
function Update-XmlVersion([System.IO.FileInfo]$XmlFile, [string]$Version, [string]$NodePath)
14+
{
15+
[Xml]$XmlContent = Get-Content $XmlFile
16+
$Node = $XmlContent.SelectSingleNode($NodePath)
17+
$Node.InnerText = $Version
18+
"$($Node.OuterXml)"
19+
$XmlContent.Save($XmlFile)
20+
}
21+
22+
function Update-JsonVersion([System.IO.FileInfo]$JsonFile, [string]$Version)
23+
{
24+
$JsonContent = Get-Content $JsonFile | ConvertFrom-Json
25+
$JsonContent.version = $Version
26+
"$($JsonFile): $($JsonContent.version)"
27+
$JsonContent | ConvertTo-Json | Out-File $JsonFile
28+
}
29+
30+
function Update-TextVersion([System.IO.FileInfo]$TextFile, [string]$OldVersion, [string]$NewVersion)
31+
{
32+
$OldContent = Get-Content $TextFile | Out-String
33+
$NewContent = $OldContent.Replace($OldVersion, $NewVersion)
34+
"$($TextFile): $NewVersion"
35+
$NewContent | Out-File $TextFile
36+
}
37+
38+
function Update-ReleaseNotes([System.IO.FileInfo]$XmlFile, [string]$Content, [string]$Version)
39+
{
40+
[Xml]$XmlContent = Get-Content $XmlFile
41+
$NewChild = New-Object System.Xml.XmlDocument
42+
$NewChild.LoadXml($Content.Replace('%Version%', $Version))
43+
$Node = $XmlContent.SelectSingleNode('/document/body/section')
44+
$Node.PrependChild($XmlContent.ImportNode($NewChild.DocumentElement, $true))
45+
"$($XmlFile): $NewVersion"
46+
$XmlContent.Save($XmlFile)
47+
}
48+
49+
Update-XmlVersion $PSScriptRoot/../pom.xml $NewVersion '/*[local-name()="project"]/*[local-name()="version"]'
50+
Update-JsonVersion $PSScriptRoot/../package.json $NewVersion
51+
Update-TextVersion $PSScriptRoot/../doc/MailTemplate.txt $OldVersion $NewVersion
52+
Update-TextVersion $PSScriptRoot/../doc/MailTemplate.Result.txt $OldVersion $NewVersion
53+
Update-TextVersion $PSScriptRoot/../doc/MailTemplate.Announce.txt $OldVersion $NewVersion
54+
Update-XmlVersion $PSScriptRoot/../src/log4net/log4net.csproj $NewVersion '/Project/PropertyGroup/Version'
55+
56+
$ReleaseNoteSection = '
57+
<section id="a%Version%" name="%Version%">
58+
<section id="a%Version%-breaking" name="Breaking Changes">
59+
</section>
60+
<br/>
61+
Apache log4net %Version% addresses reported issues:
62+
<section id="a%Version%-bug" name="Bug fixes">
63+
<ul>
64+
<li>
65+
<a href="https://github.com/apache/logging-log4net/issues/tbd">tbd</a> (by tbd)
66+
</li>
67+
</ul>
68+
</section>
69+
<section id="a%Version%-enhancements" name="Enhancements">
70+
<ul>
71+
<li>
72+
<a href="https://github.com/apache/logging-log4net/issues/tbd">tbd</a> (by tbd)
73+
</li>
74+
</ul>
75+
</section>
76+
</section>'
77+
78+
Update-ReleaseNotes $PSScriptRoot/../src/site/xdoc/release/release-notes.xml $ReleaseNoteSection $NewVersion

src/log4net.sln

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".doc", ".doc", "{33D80AD3-8
4343
..\doc\BUILDING.md = ..\doc\BUILDING.md
4444
site\xdoc\release\config-examples.xml = site\xdoc\release\config-examples.xml
4545
site\xdoc\download_log4net.xml = site\xdoc\download_log4net.xml
46+
..\doc\MailTemplate.Announce.txt = ..\doc\MailTemplate.Announce.txt
4647
..\doc\MailTemplate.Result.txt = ..\doc\MailTemplate.Result.txt
4748
..\doc\MailTemplate.txt = ..\doc\MailTemplate.txt
4849
site\xdoc\release\release-notes.xml = site\xdoc\release\release-notes.xml
4950
..\doc\RELEASING.md = ..\doc\RELEASING.md
5051
EndProjectSection
5152
EndProject
52-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".scripts", ".scripts", "{050E0D0D-D916-42FD-AE58-32965336D357}"
53-
ProjectSection(SolutionItems) = preProject
54-
..\scripts\build-preview.ps1 = ..\scripts\build-preview.ps1
55-
..\scripts\install-dotnet-sdk.ps1 = ..\scripts\install-dotnet-sdk.ps1
56-
..\scripts\sign-log4net-libraries.ps1 = ..\scripts\sign-log4net-libraries.ps1
57-
..\scripts\sign-log4net-libraries.sh = ..\scripts\sign-log4net-libraries.sh
58-
EndProjectSection
59-
EndProject
6053
Global
6154
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6255
Debug|Any CPU = Debug|Any CPU

src/log4net/log4net.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>3.0.0</Version>
3+
<Version>3.1.0</Version>
44
<PackageId>log4net</PackageId>
55
<Product>Apache log4net</Product>
66
<Title>$(Product)</Title>
@@ -55,7 +55,8 @@ log4net is designed with two distinct goals in mind: speed and flexibility
5555
<AssemblyCopyright>$(Copyright)</AssemblyCopyright>
5656
<AssemblyTrademark>Apache and Apache log4net are trademarks of The Apache Software Foundation</AssemblyTrademark>
5757
<AssemblyDefaultAlias>$(AssemblyName)</AssemblyDefaultAlias>
58-
<AssemblyCulture></AssemblyCulture>
58+
<AssemblyCulture>
59+
</AssemblyCulture>
5960
</PropertyGroup>
6061
<PropertyGroup Condition="'$(TargetFramework)'=='net462'">
6162
<AssemblyTitle>$(AssemblyTitle) Framework 4.6.2</AssemblyTitle>
@@ -114,15 +115,15 @@ log4net is designed with two distinct goals in mind: speed and flexibility
114115
<PrivateAssets>all</PrivateAssets>
115116
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
116117
</PackageReference>
117-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
118+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
118119
</ItemGroup>
119120
<Import Project="../MonoForFramework.targets" />
120121
<Target Name="_ResolveCopyLocalNuGetPackagePdbsAndXml" Condition="$(CopyLocalLockFileAssemblies) == true" AfterTargets="ResolveReferences">
121122
<!-- "Workaround" for missing '.pdb'-Files from NuGet Packages -->
122123
<!-- https://github.com/dotnet/sdk/issues/1458#issuecomment-420456386 -->
123124
<ItemGroup>
124-
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).pdb')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).pdb')" />
125-
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).xml')" />
125+
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths-&gt;'%(RootDir)%(Directory)%(Filename).pdb')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).pdb')" />
126+
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths-&gt;'%(RootDir)%(Directory)%(Filename).xml')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).xml')" />
126127
</ItemGroup>
127128
</Target>
128129
</Project>

0 commit comments

Comments
 (0)