:construction: prepare for release
diff --git a/local-tasks/hash-build-artifacts.js b/local-tasks/hash-build-artifacts.js
new file mode 100644
index 0000000..91fea91
--- /dev/null
+++ b/local-tasks/hash-build-artifacts.js
@@ -0,0 +1,51 @@
+const
+ gulp = requireModule("gulp");
+
+gulp.task("hash-build-artifacts", async () => {
+ const
+ path = require("path"),
+ crypto = require("crypto"),
+ { readFile, writeFile, ls, FsEntities } = require("yafs"),
+ artifactsFolder = path.join("build", "artifacts");
+ const
+ buildArtifacts = await ls(artifactsFolder, {
+ fullPaths: true,
+ entities: FsEntities.files
+ }),
+ nupkg = buildArtifacts.find(p => p.match(/\.nupkg$/)),
+ binaries = buildArtifacts.find(p => p.match(/apache-log4net-binaries-\d+\.\d+\.\d+.zip$/)),
+ source = buildArtifacts.find(p => p.match(/apache-log4net-source-\d+\.\d+\.\d+.zip$/));
+
+ if (!nupkg) {
+ throw new Error(`apache-log4net nupkg not found in ${artifactsFolder}`);
+ }
+ if (!binaries) {
+ throw new Error(`apache-log4net binaries zip not found in ${artifactsFolder}`);
+ }
+ if (!source) {
+ throw new Error(`apache-log4net source zip not found in ${artifactsFolder}`);
+ }
+
+ await writeSHA512For(nupkg);
+ await writeSHA512For(binaries);
+ await writeSHA512For(source);
+
+ function writeSHA512For(filepath) {
+ return new Promise(async (resolve, reject) => {
+ try {
+ const
+ hash = crypto.createHash("sha512"),
+ data = await readFile(filepath);
+ hash.update(data);
+ const
+ outfile = `${filepath}.sha512`,
+ hex = hash.digest("hex"),
+ contents = `${hex} *${path.basename(filepath)}`;
+ await writeFile(outfile, contents);
+ resolve();
+ } catch (e) {
+ reject(e);
+ }
+ });
+ }
+});
diff --git a/local-tasks/prefix-build-artifacts.js b/local-tasks/prefix-build-artifacts.js
new file mode 100644
index 0000000..4f34ae9
--- /dev/null
+++ b/local-tasks/prefix-build-artifacts.js
@@ -0,0 +1,23 @@
+const { renameSync } = require("fs");
+
+const gulp = requireModule("gulp");
+
+gulp.task("prefix-build-artifacts", async () => {
+ // prefixes build artifacts with 'apache-'
+ const
+ { ls, rename, FsEntities } = require("yafs"),
+ path = require("path"),
+ artifactsFolder = path.join("build/artifacts"),
+ contents = await ls(artifactsFolder, { fullPaths: true, entities: FsEntities.files });
+ for (let item of contents) {
+ const basename = path.basename(item);
+ if (basename.match(/^apache-/)) {
+ continue;
+ }
+ const newName = path.join(
+ path.dirname(item),
+ `apache-${basename}`
+ );
+ await rename(item, newName, true);
+ }
+});
\ No newline at end of file
diff --git a/local-tasks/prepare-build-artifacts.js b/local-tasks/prepare-build-artifacts.js
new file mode 100644
index 0000000..3c22504
--- /dev/null
+++ b/local-tasks/prepare-build-artifacts.js
@@ -0,0 +1,8 @@
+const
+ gulp = requireModule("gulp");
+
+gulp.task("prepare-build-artifacts", gulp.series(
+ "zip",
+ "prefix-build-artifacts",
+ "hash-build-artifacts"
+));
diff --git a/local-tasks/zip.js b/local-tasks/zip.js
index 4e6b5f1..cbfce84 100644
--- a/local-tasks/zip.js
+++ b/local-tasks/zip.js
@@ -10,7 +10,7 @@
gulp.task("zip-binaries", async () => {
const version = await readVersion();
return promisify(
- gulp.src("build/Release/**/*")
+ gulp.src(["build/Release/**/*", "LICENSE", "NOTICE"])
.pipe(zip(`log4net-binaries-${version}.zip`))
.pipe(gulp.dest(target))
);
@@ -39,4 +39,4 @@
function readVersion() {
return readCsProjVersion("src/log4net/log4net.csproj");
-}
\ No newline at end of file
+}
diff --git a/package-lock.json b/package-lock.json
index 6aa4fb5..15bcb21 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6151,6 +6151,12 @@
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
"dev": true
},
+ "yafs": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/yafs/-/yafs-1.5.0.tgz",
+ "integrity": "sha512-FRrHCUDPZw4UEAi53wJhXXGdWHdd9/cZUpoh8kBGI/JCWkSIMB2UifeU2AD6GXaRd4wwrQYzEDrX1HTrSoup5w==",
+ "dev": true
+ },
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
diff --git a/package.json b/package.json
index a006951..ec8b812 100644
--- a/package.json
+++ b/package.json
@@ -8,9 +8,9 @@
"build": "run-s clean-build \"zarro build\"",
"build-release": "cross-env BUILD_CONFIGURATION=Release run-s clean-build \"zarro build\"",
"build-site": "run-s \"zarro build-site\"",
- "zip": "run-s \"zarro zip\"",
+ "prepare-build-artifacts": "run-s \"zarro prepare-build-artifacts\"",
"dump-env": "node -e \"console.log(process.env);\"",
- "release": "run-s build-release zip",
+ "release": "run-s build-release prepare-build-artifacts build-site",
"zarro": "cross-env BUILD_INCLUDE=src/log4net.sln zarro"
},
"repository": {
@@ -28,7 +28,8 @@
"gulp-zip": "^5.0.1",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
- "zarro": "^1.77.0",
- "which": "^2.0.2"
+ "which": "^2.0.2",
+ "yafs": "^1.5.0",
+ "zarro": "^1.77.0"
}
}
diff --git a/src/log4net/log4net.csproj b/src/log4net/log4net.csproj
index ff9052b..62b1734 100644
--- a/src/log4net/log4net.csproj
+++ b/src/log4net/log4net.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>log4net</PackageId>
- <Version>2.0.9</Version>
+ <Version>2.0.10</Version>
<Title>Apache log4net</Title>
<Product>Apache log4net</Product>
<Description>
@@ -14,7 +14,7 @@
<Authors>The Apache Software Foundation</Authors>
<Owners>Apache Logging Project, Jiří Činčura</Owners>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
- <PackageProjectUrl>http://logging.apache.org/log4net/</PackageProjectUrl>
+ <PackageProjectUrl>https://logging.apache.org/log4net/</PackageProjectUrl>
<PackageIcon>package-icon.png</PackageIcon>
<Copyright>Copyright 2004-2017 The Apache Software Foundation</Copyright>
<PackageTags>logging log tracing logfiles</PackageTags>
diff --git a/src/site/xdoc/download_log4net.xml b/src/site/xdoc/download_log4net.xml
index c592219..5aa7ac5 100644
--- a/src/site/xdoc/download_log4net.xml
+++ b/src/site/xdoc/download_log4net.xml
@@ -33,17 +33,17 @@
<p>Users who download the ZIP files to Windows may need to unblock the
archive (right click on the ZIP and press the "Unblock" button)
before extracting it.</p>
-
+
</section>
- <section name="log4net 2.0.9">
+ <section name="log4net 2.0.10">
<subsection name="Source">
<table>
<tr>
- <td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.9.zip">apache-log4net-source-2.0.9.zip</a></td>
- <td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.9.zip.sha512">sha512</a></td>
- <td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.9.zip.asc">pgp</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.10.zip">apache-log4net-source-2.0.10.zip</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.10.zip.sha512">sha512</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.10.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
@@ -52,14 +52,14 @@
<p>Binaries are available in a zip file or nupkg, which is also available from <a href="https://www.nuget.org/packages/log4net/">nuget.org</a></p>
<table>
<tr>
- <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.9.zip">log4net-binaries-2.0.9.zip</a></td>
- <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.9.zip.sha512">sha512</a></td>
- <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.9.zip.asc">pgp</a></td>
- </tr>
+ <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.10.zip">log4net-binaries-2.0.10.zip</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.10.zip.sha512">sha512</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.10.zip.asc">pgp</a></td>
+ </tr>
<tr>
- <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.9.nupkg">log4net-2.0.9.nupkg</a></td>
- <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.9.nupkg.sha512">sha512</a></td>
- <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.9.nupkg.asc">pgp</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.10.nupkg">log4net-2.0.10.nupkg</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.10.nupkg.sha512">sha512</a></td>
+ <td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.10.nupkg.asc">pgp</a></td>
</tr>
</table>
</subsection>
diff --git a/src/site/xdoc/release/release-notes.xml b/src/site/xdoc/release/release-notes.xml
index 89ce857..58f3707 100644
--- a/src/site/xdoc/release/release-notes.xml
+++ b/src/site/xdoc/release/release-notes.xml
@@ -27,6 +27,22 @@
<body>
<section id="main" name="Apache log4net™ Release Notes">
+ <section id="2.0.10" name="2.0.10">
+ <p>
+ Apache log4net 2.0.10 improves <code>netstandard2.0</code> support
+ thanks to community member @NicholasNoise.
+ </p>
+ <section id="2.0.10-bug" name="Bug Fixes">
+ <ul>
+ <li>
+ [<a href="https://issues.apache.org/jira/browse/LOG4NET-575">LOG4NET-575</a>]
+ Addresses CVE-2018-1285 by cherry-picking the fix from
+ Dominik Psenner, reported by Karthik Balasundaram, as it already
+ existed in the the develop branch
+ </li>
+ </ul>
+ </section>
+ </section>
<section id="2.0.9" name="2.0.9">
<p>
@@ -36,8 +52,12 @@
</p>
<section id="2.0.9-bug" name="Bug Fixes">
<ul>
- <li>[<a href="https://issues.apache.org/jira/browse/LOG4NET-559">LOG4NET-559</a>] Add null checkes to avoid issues thrown by custom appenders</li>
- <li>[<a href="https://issues.apache.org/jira/browse/LOG4NET-563">LOG4NET-563</a>] Site styling copied from log4j</li>
+ <li>[<a href="https://issues.apache.org/jira/browse/LOG4NET-559">LOG4NET-559</a>] Add null
+ checkes to avoid issues thrown by custom appenders
+ </li>
+ <li>[<a href="https://issues.apache.org/jira/browse/LOG4NET-563">LOG4NET-563</a>] Site styling
+ copied from log4j
+ </li>
</ul>
</section>
</section>