-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from apache/Feature/181-automate-version-bumps
automate version bumps
- Loading branch information
Showing
9 changed files
with
382 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
To: announce@apache.org, dev@logging.apache.org | ||
Subject: [ANNOUNCE] Apache log4net 3.1.0 released | ||
|
||
Hi, | ||
|
||
the Apache log4net team is pleased to announce the 3.1.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.1.0 | ||
- https://www.nuget.org/packages/log4net/3.1.0 | ||
|
||
== Release Notes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
To: dev@logging.apache.org | ||
Subject: [RESULT][VOTE] Release Apache Log4net 3.0.0 | ||
Subject: [RESULT][VOTE] Release Apache Log4net 3.1.0 | ||
|
||
Hi, | ||
|
||
with +3 binding votes (Davyd, Volkan and myself), apache log4net 3.0.0 is released and available: | ||
https://github.com/apache/logging-log4net/releases/tag/rel%2F3.0.0 | ||
with +3 binding votes (Davyd, Volkan and myself), apache log4net 3.1.0 is released and available: | ||
https://github.com/apache/logging-log4net/releases/tag/rel%2F3.1.0 | ||
|
||
Source snapshot at: | ||
https://downloads.apache.org/logging/log4net/source/apache-log4net-source-3.0.0.zip | ||
https://downloads.apache.org/logging/log4net/source/apache-log4net-source-3.1.0.zip | ||
|
||
Thanks | ||
|
||
--------------------------------------------------------------------------------------------------- | ||
This is a vote to release the Apache Log4net 3.0.0. | ||
This is a vote to release the Apache Log4net 3.1.0. | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
Param ( | ||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string]$OldVersion, | ||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string]$NewVersion | ||
) | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.