Skip to content

Commit

Permalink
Merge pull request #116 from apache/Feature/v2.0.16
Browse files Browse the repository at this point in the history
Release notes for 2.0.16
  • Loading branch information
fluffynuts committed Mar 8, 2024
2 parents fe6bf05 + 8ba453e commit a1c3ce5
Show file tree
Hide file tree
Showing 16 changed files with 2,361 additions and 2,030 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,5 @@ vs_buildtools.exe
dotnetfx35.exe
*.exe
/src/Binaries/*

local-tasks/*.generated.js
11 changes: 11 additions & 0 deletions .zarro-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ MAX_CONCURRENCY=1

# specify what to build (prevents accidental build of any other sln)
BUILD_INCLUDE=src/log4net.sln

# using zarro's pack target, tell it what to pack
PACK_INCLUDE_CSPROJ=log4net.csproj
# the pack target increments the PackageVersion node in log4net.csproj
# - setting this "truthy" propagates that change to the Version node
PACK_SYNC_PROJECT_VERSION=1
# all version changes should be manual, however, it's generally
# accepted that the beta for, eg, 1.2.3 is 1.2.3-{date}-{sha}
# ie beta packages carry the main version of their intended
# release version
PACK_INCREMENT_MINOR_ON_FIRST_RELEASE=0
53 changes: 27 additions & 26 deletions local-tasks/build-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -16,32 +16,33 @@
// under the License.

const
gulp = requireModule("gulp"),
spawn = requireModule("spawn"),
env = requireModule("env"),
os = require("os"),
which = require("which");
gulp = requireModule("gulp"),
spawn = requireModule("spawn"),
env = requireModule("env"),
os = require("os"),
which = require("which");

gulp.task("build-site", async () => {
let maven;
try {
maven = await which("mvn");
} catch (e) {
let extra;
switch (os.platform()) {
case "win32":
extra = "You may install maven via chocolatey (https://chocolatey.org)";
break;
case "darwin":
extra = "You may install maven via homebrew";
break;
default:
extra = "You should install maven with your package manager";
break;
}
throw new Error(`Unable to find mvn in your path. ${extra}`);
const { rm } = require("yafs");
let maven;
try {
maven = await which("mvn");
} catch (e) {
let extra;
switch (os.platform()) {
case "win32":
extra = "You may install maven via chocolatey (https://chocolatey.org)";
break;
case "darwin":
extra = "You may install maven via homebrew";
break;
default:
extra = "You should install maven with your package manager";
break;
}

return spawn("mvn", [ "site" ]);
throw new Error(`Unable to find mvn in your path. ${ extra }`);
}
await rm("target");
return spawn("mvn", [ "site" ]);
});

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/// <reference path="../node_modules/zarro/types.d.ts" />
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -16,22 +17,22 @@
// under the License.

const
gulp = requireModule("gulp");
gulp = requireModule<Gulp>("gulp");

gulp.task("update-version-info", async () => {
// the version as per the .csproj is the correct version, but there
// are other places where the version string is set via [assembly]
// attributes, so we need to re-align them all
const
Git = require("simple-git/promise"),
readTextFile = requireModule("read-text-file"),
writeTextFile = requireModule("write-text-file"),
readCsProjVersion = requireModule("read-csproj-version"),
currentVersion = await readCsProjVersion("src/log4net/log4net.csproj"),
Git = require("simple-git"),
{ readTextFile, writeTextFile } = require("yafs"),
{ readProjectVersion } = requireModule<CsProjUtils>("csproj-utils"),
currentVersion = await readProjectVersion("src/log4net/log4net.csproj"),
assemblyInfo = "src/log4net/AssemblyInfo.cs",
assemblyVersionInfo = "src/log4net/AssemblyVersionInfo.cs",
versionString = sanitiseVersion(currentVersion);


await updateVersionsIn(assemblyInfo, versionString);
await updateVersionsIn(assemblyVersionInfo, versionString);

Expand All @@ -43,9 +44,9 @@ gulp.task("update-version-info", async () => {
await git.commit(`:bookmark: update versioning to ${versionString}`);

async function updateVersionsIn(
filePath,
newVersion
) {
filePath: string,
newVersion: string
): Promise<void> {
const
contents = await readTextFile(filePath),
updated = contents
Expand All @@ -56,7 +57,7 @@ gulp.task("update-version-info", async () => {
await writeTextFile(filePath, updated);
}

function sanitiseVersion(version) {
function sanitiseVersion(version: string): string {
const parts = version.split(".");
while (parts.length < 4) {
parts.push("0");
Expand Down
2 changes: 1 addition & 1 deletion log4net.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
<property name="log4net.basedir" value="." />
<property name="project.build.config" value="debug" />
<property name="project.build.package" value="false" />
<property name="package.version" value="2.0.15"/>
<property name="package.version" value="2.0.16"/>

<!-- Include log4net helpers -->
<include buildfile="${log4net.basedir}/log4net.include" />
Expand Down
2 changes: 1 addition & 1 deletion log4net.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ limitations under the License.
<!-- SHFB properties -->
<FrameworkVersion>.NET Framework 3.5</FrameworkVersion>
<OutputPath>doc\sdk\net\4.0\</OutputPath>
<HtmlHelpName>log4net-sdk-2.0.15</HtmlHelpName>
<HtmlHelpName>log4net-sdk-2.0.16</HtmlHelpName>
<Language>en-US</Language>
<SyntaxFilters>Standard</SyntaxFilters>
<SdkLinkTarget>Blank</SdkLinkTarget>
Expand Down
50 changes: 35 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"prepare-build-artifacts": "zarro @",
"dump-env": "node -e \"console.log(process.env);\"",
"release": "run-s update-version-info build-release prepare-build-artifacts build-site",
"release-beta": "cross-env DOTNET_CORE=1 VERSION_INCREMENT_STRATEGY=prerelease BUILD_CONFIGURATION=Release zarro release-nuget",
"zarro": "zarro",
"update-version-info": "zarro @"
"update-version-info": "zarro @",
"this-is-an-example": "zarro @"
},
"repository": {
"type": "git",
Expand All @@ -36,9 +38,10 @@
"gulp-zip": "^5.0.2",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"simple-git": "^3.16.0",
"simple-git": "^3.22.0",
"typescript": "^5.3.3",
"which": "^2.0.2",
"yafs": "^1.5.0",
"zarro": "^1.169.0"
"yafs": "^1.36.0",
"zarro": "^1.170.0"
}
}
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!--
}
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
Expand All @@ -20,7 +21,7 @@
<groupId>log4net</groupId>
<artifactId>apache-log4net</artifactId>
<packaging>pom</packaging>
<version>2.0.15</version>
<version>2.0.16</version>
<name>Apache log4net</name>
<description>Logging framework for Microsoft .NET Framework.</description>
<url>http://logging.apache.org/log4net/</url>
Expand Down
2 changes: 1 addition & 1 deletion src/log4net.Tests/log4net.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -29,6 +28,7 @@
<OutputPath>bin\$(Configuration)</OutputPath>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
<Deterministic>true</Deterministic>
<!-- suppress analyzer mismatch warning -->
<NoWarn>CS8032</NoWarn>
</PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/log4net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4net-673", "integration-
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4net-681", "integration-testing\log4net-681\log4net-681.csproj", "{A4F9E417-2250-4075-9118-B4FF1C58B6C5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{78CDAF4E-3F9F-4D00-A494-FFAE30E7EF0E}"
ProjectSection(SolutionItems) = preProject
..\.asf.yaml = ..\.asf.yaml
..\.gitignore = ..\.gitignore
..\.zarro-defaults = ..\.zarro-defaults
..\package.json = ..\package.json
..\pom.xml = ..\pom.xml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down

0 comments on commit a1c3ce5

Please sign in to comment.