You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by fr...@apache.org on 2024/09/16 16:09:16 UTC
(logging-log4net) branch Feature/181-automate-version-bumps updated (3eb13cbc -> 948b5972)
This is an automated email from the ASF dual-hosted git repository.
freeandnil pushed a change to branch Feature/181-automate-version-bumps
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
discard 3eb13cbc #181 added script for bumping version - added MailTemplate for announcement
new 948b5972 #181 added script for bumping version - added MailTemplate for announcement
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (3eb13cbc)
\
N -- N -- N refs/heads/Feature/181-automate-version-bumps (948b5972)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/log4net.sln | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
(logging-log4net) 01/01: #181 added script for bumping version - added MailTemplate for announcement
Posted by fr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
freeandnil pushed a commit to branch Feature/181-automate-version-bumps
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit 948b597216f59546502e8b4f1602b7db3abb9790
Author: Jan Friedrich <fr...@apache.org>
AuthorDate: Mon Sep 16 18:08:31 2024 +0200
#181 added script for bumping version
- added MailTemplate for announcement
---
doc/MailTemplate.Announce.txt | 13 ++++++++
scripts/update-version.ps1 | 78 +++++++++++++++++++++++++++++++++++++++++++
src/log4net.sln | 9 +----
3 files changed, 92 insertions(+), 8 deletions(-)
diff --git a/doc/MailTemplate.Announce.txt b/doc/MailTemplate.Announce.txt
new file mode 100644
index 00000000..b1bd78ba
--- /dev/null
+++ b/doc/MailTemplate.Announce.txt
@@ -0,0 +1,13 @@
+To: announce@apache.org, dev@logging.apache.org
+Subject: [ANNOUNCE] Apache log4net 3.0.0 released
+
+Hi,
+
+the Apache log4net team is pleased to announce the 3.0.0 release.
+For further information (support, download, etc.) see
+- https://logging.apache.org/log4net/release/release-notes.html
+- https://github.com/apache/logging-log4net/releases/tag/rel%2F3.0.0
+- https://www.nuget.org/packages/log4net/3.0.0
+
+== Release Notes
+
diff --git a/scripts/update-version.ps1 b/scripts/update-version.ps1
new file mode 100644
index 00000000..1d779226
--- /dev/null
+++ b/scripts/update-version.ps1
@@ -0,0 +1,78 @@
+Param (
+ [Parameter()]
+ [ValidateNotNullOrEmpty()]
+ [string]$OldVersion = '3.0.0',
+ [Parameter()]
+ [ValidateNotNullOrEmpty()]
+ [string]$NewVersion = '3.1.0'
+)
+
+Set-StrictMode -Version Latest
+$ErrorActionPreference = 'Stop'
+
+function Update-XmlVersion([System.IO.FileInfo]$XmlFile, [string]$Version, [string]$NodePath)
+{
+ [Xml]$XmlContent = Get-Content $XmlFile
+ $Node = $XmlContent.SelectSingleNode($NodePath)
+ $Node.InnerText = $Version
+ "$($Node.OuterXml)"
+ $XmlContent.Save($XmlFile)
+}
+
+function Update-JsonVersion([System.IO.FileInfo]$JsonFile, [string]$Version)
+{
+ $JsonContent = Get-Content $JsonFile | ConvertFrom-Json
+ $JsonContent.version = $Version
+ "$($JsonFile): $($JsonContent.version)"
+ $JsonContent | ConvertTo-Json | Out-File $JsonFile
+}
+
+function Update-TextVersion([System.IO.FileInfo]$TextFile, [string]$OldVersion, [string]$NewVersion)
+{
+ $OldContent = Get-Content $TextFile | Out-String
+ $NewContent = $OldContent.Replace($OldVersion, $NewVersion)
+ "$($TextFile): $NewVersion"
+ $NewContent | Out-File $TextFile
+}
+
+function Update-ReleaseNotes([System.IO.FileInfo]$XmlFile, [string]$Content, [string]$Version)
+{
+ [Xml]$XmlContent = Get-Content $XmlFile
+ $NewChild = New-Object System.Xml.XmlDocument
+ $NewChild.LoadXml($Content.Replace('%Version%', $Version))
+ $Node = $XmlContent.SelectSingleNode('/document/body/section')
+ $Node.PrependChild($XmlContent.ImportNode($NewChild.DocumentElement, $true))
+ "$($XmlFile): $NewVersion"
+ $XmlContent.Save($XmlFile)
+}
+
+Update-XmlVersion $PSScriptRoot/../pom.xml $NewVersion '/*[local-name()="project"]/*[local-name()="version"]'
+Update-JsonVersion $PSScriptRoot/../package.json $NewVersion
+Update-TextVersion $PSScriptRoot/../doc/MailTemplate.txt $OldVersion $NewVersion
+Update-TextVersion $PSScriptRoot/../doc/MailTemplate.Result.txt $OldVersion $NewVersion
+Update-TextVersion $PSScriptRoot/../doc/MailTemplate.Announce.txt $OldVersion $NewVersion
+Update-XmlVersion $PSScriptRoot/../src/log4net/log4net.csproj $NewVersion '/Project/PropertyGroup/Version'
+
+$ReleaseNoteSection = '
+<section id="a%Version%" name="%Version%">
+ <section id="a%Version%-breaking" name="Breaking Changes">
+ </section>
+ <br/>
+ Apache log4net %Version% addresses reported issues:
+ <section id="a%Version%-bug" name="Bug fixes">
+ <ul>
+ <li>
+ <a href="https://github.com/apache/logging-log4net/issues/tbd">tbd</a> (by tbd)
+ </li>
+ </ul>
+ </section>
+ <section id="a%Version%-enhancements" name="Enhancements">
+ <ul>
+ <li>
+ <a href="https://github.com/apache/logging-log4net/issues/tbd">tbd</a> (by tbd)
+ </li>
+ </ul>
+ </section>
+</section>'
+
+Update-ReleaseNotes $PSScriptRoot/../src/site/xdoc/release/release-notes.xml $ReleaseNoteSection $NewVersion
\ No newline at end of file
diff --git a/src/log4net.sln b/src/log4net.sln
index fb1b97c5..9e99f277 100644
--- a/src/log4net.sln
+++ b/src/log4net.sln
@@ -43,20 +43,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".doc", ".doc", "{33D80AD3-8
..\doc\BUILDING.md = ..\doc\BUILDING.md
site\xdoc\release\config-examples.xml = site\xdoc\release\config-examples.xml
site\xdoc\download_log4net.xml = site\xdoc\download_log4net.xml
+ ..\doc\MailTemplate.Announce.txt = ..\doc\MailTemplate.Announce.txt
..\doc\MailTemplate.Result.txt = ..\doc\MailTemplate.Result.txt
..\doc\MailTemplate.txt = ..\doc\MailTemplate.txt
site\xdoc\release\release-notes.xml = site\xdoc\release\release-notes.xml
..\doc\RELEASING.md = ..\doc\RELEASING.md
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".scripts", ".scripts", "{050E0D0D-D916-42FD-AE58-32965336D357}"
- ProjectSection(SolutionItems) = preProject
- ..\scripts\build-preview.ps1 = ..\scripts\build-preview.ps1
- ..\scripts\install-dotnet-sdk.ps1 = ..\scripts\install-dotnet-sdk.ps1
- ..\scripts\sign-log4net-libraries.ps1 = ..\scripts\sign-log4net-libraries.ps1
- ..\scripts\sign-log4net-libraries.sh = ..\scripts\sign-log4net-libraries.sh
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU