Skip to content

Commit fd53aa1

Browse files
committed
🚧 prepare for release
1 parent 3242db5 commit fd53aa1

9 files changed

+131
-22
lines changed

local-tasks/hash-build-artifacts.js

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const
2+
gulp = requireModule("gulp");
3+
4+
gulp.task("hash-build-artifacts", async () => {
5+
const
6+
path = require("path"),
7+
crypto = require("crypto"),
8+
{ readFile, writeFile, ls, FsEntities } = require("yafs"),
9+
artifactsFolder = path.join("build", "artifacts");
10+
const
11+
buildArtifacts = await ls(artifactsFolder, {
12+
fullPaths: true,
13+
entities: FsEntities.files
14+
}),
15+
nupkg = buildArtifacts.find(p => p.match(/\.nupkg$/)),
16+
binaries = buildArtifacts.find(p => p.match(/apache-log4net-binaries-\d+\.\d+\.\d+.zip$/)),
17+
source = buildArtifacts.find(p => p.match(/apache-log4net-source-\d+\.\d+\.\d+.zip$/));
18+
19+
if (!nupkg) {
20+
throw new Error(`apache-log4net nupkg not found in ${artifactsFolder}`);
21+
}
22+
if (!binaries) {
23+
throw new Error(`apache-log4net binaries zip not found in ${artifactsFolder}`);
24+
}
25+
if (!source) {
26+
throw new Error(`apache-log4net source zip not found in ${artifactsFolder}`);
27+
}
28+
29+
await writeSHA512For(nupkg);
30+
await writeSHA512For(binaries);
31+
await writeSHA512For(source);
32+
33+
function writeSHA512For(filepath) {
34+
return new Promise(async (resolve, reject) => {
35+
try {
36+
const
37+
hash = crypto.createHash("sha512"),
38+
data = await readFile(filepath);
39+
hash.update(data);
40+
const
41+
outfile = `${filepath}.sha512`,
42+
hex = hash.digest("hex"),
43+
contents = `${hex} *${path.basename(filepath)}`;
44+
await writeFile(outfile, contents);
45+
resolve();
46+
} catch (e) {
47+
reject(e);
48+
}
49+
});
50+
}
51+
});

local-tasks/prefix-build-artifacts.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const { renameSync } = require("fs");
2+
3+
const gulp = requireModule("gulp");
4+
5+
gulp.task("prefix-build-artifacts", async () => {
6+
// prefixes build artifacts with 'apache-'
7+
const
8+
{ ls, rename, FsEntities } = require("yafs"),
9+
path = require("path"),
10+
artifactsFolder = path.join("build/artifacts"),
11+
contents = await ls(artifactsFolder, { fullPaths: true, entities: FsEntities.files });
12+
for (let item of contents) {
13+
const basename = path.basename(item);
14+
if (basename.match(/^apache-/)) {
15+
continue;
16+
}
17+
const newName = path.join(
18+
path.dirname(item),
19+
`apache-${basename}`
20+
);
21+
await rename(item, newName, true);
22+
}
23+
});
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const
2+
gulp = requireModule("gulp");
3+
4+
gulp.task("prepare-build-artifacts", gulp.series(
5+
"zip",
6+
"prefix-build-artifacts",
7+
"hash-build-artifacts"
8+
));

local-tasks/zip.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gulp.task("zip", [ "zip-binaries", "zip-source"], () => Promise.resolve());
1010
gulp.task("zip-binaries", async () => {
1111
const version = await readVersion();
1212
return promisify(
13-
gulp.src("build/Release/**/*")
13+
gulp.src(["build/Release/**/*", "LICENSE", "NOTICE"])
1414
.pipe(zip(`log4net-binaries-${version}.zip`))
1515
.pipe(gulp.dest(target))
1616
);
@@ -39,4 +39,4 @@ gulp.task("zip-source", async () => {
3939

4040
function readVersion() {
4141
return readCsProjVersion("src/log4net/log4net.csproj");
42-
}
42+
}

package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"build": "run-s clean-build \"zarro build\"",
99
"build-release": "cross-env BUILD_CONFIGURATION=Release run-s clean-build \"zarro build\"",
1010
"build-site": "run-s \"zarro build-site\"",
11-
"zip": "run-s \"zarro zip\"",
11+
"prepare-build-artifacts": "run-s \"zarro prepare-build-artifacts\"",
1212
"dump-env": "node -e \"console.log(process.env);\"",
13-
"release": "run-s build-release zip",
13+
"release": "run-s build-release prepare-build-artifacts build-site",
1414
"zarro": "cross-env BUILD_INCLUDE=src/log4net.sln zarro"
1515
},
1616
"repository": {
@@ -28,7 +28,8 @@
2828
"gulp-zip": "^5.0.1",
2929
"npm-run-all": "^4.1.5",
3030
"rimraf": "^3.0.2",
31-
"zarro": "^1.77.0",
32-
"which": "^2.0.2"
31+
"which": "^2.0.2",
32+
"yafs": "^1.5.0",
33+
"zarro": "^1.77.0"
3334
}
3435
}

src/log4net/log4net.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<PackageId>log4net</PackageId>
4-
<Version>2.0.9</Version>
4+
<Version>2.0.10</Version>
55
<Title>Apache log4net</Title>
66
<Product>Apache log4net</Product>
77
<Description>
@@ -14,7 +14,7 @@
1414
<Authors>The Apache Software Foundation</Authors>
1515
<Owners>Apache Logging Project, Jiří Činčura</Owners>
1616
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
17-
<PackageProjectUrl>http://logging.apache.org/log4net/</PackageProjectUrl>
17+
<PackageProjectUrl>https://logging.apache.org/log4net/</PackageProjectUrl>
1818
<PackageIcon>package-icon.png</PackageIcon>
1919
<Copyright>Copyright 2004-2017 The Apache Software Foundation</Copyright>
2020
<PackageTags>logging log tracing logfiles</PackageTags>

src/site/xdoc/download_log4net.xml

+12-12
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ limitations under the License.
3333
<p>Users who download the ZIP files to Windows may need to unblock the
3434
archive (right click on the ZIP and press the "Unblock" button)
3535
before extracting it.</p>
36-
36+
3737
</section>
3838

39-
<section name="log4net 2.0.9">
39+
<section name="log4net 2.0.10">
4040

4141
<subsection name="Source">
4242
<table>
4343
<tr>
44-
<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>
45-
<td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.9.zip.sha512">sha512</a></td>
46-
<td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.9.zip.asc">pgp</a></td>
44+
<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>
45+
<td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.10.zip.sha512">sha512</a></td>
46+
<td><a href="https://downloads.apache.org/logging/log4net/source/apache-log4net-source-2.0.10.zip.asc">pgp</a></td>
4747
</tr>
4848
</table>
4949
</subsection>
@@ -52,14 +52,14 @@ limitations under the License.
5252
<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>
5353
<table>
5454
<tr>
55-
<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>
56-
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.9.zip.sha512">sha512</a></td>
57-
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.9.zip.asc">pgp</a></td>
58-
</tr>
55+
<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>
56+
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.10.zip.sha512">sha512</a></td>
57+
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net-binaries-2.0.10.zip.asc">pgp</a></td>
58+
</tr>
5959
<tr>
60-
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.9.nupkg">log4net-2.0.9.nupkg</a></td>
61-
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.9.nupkg.sha512">sha512</a></td>
62-
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.9.nupkg.asc">pgp</a></td>
60+
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.10.nupkg">log4net-2.0.10.nupkg</a></td>
61+
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.10.nupkg.sha512">sha512</a></td>
62+
<td><a href="https://downloads.apache.org/logging/log4net/binaries/apache-log4net.2.0.10.nupkg.asc">pgp</a></td>
6363
</tr>
6464
</table>
6565
</subsection>

src/site/xdoc/release/release-notes.xml

+22-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ limitations under the License.
2727
<body>
2828

2929
<section id="main" name="Apache log4net&#x2122; Release Notes">
30+
<section id="2.0.10" name="2.0.10">
31+
<p>
32+
Apache log4net 2.0.10 improves <code>netstandard2.0</code> support
33+
thanks to community member @NicholasNoise.
34+
</p>
35+
<section id="2.0.10-bug" name="Bug Fixes">
36+
<ul>
37+
<li>
38+
[<a href="https://issues.apache.org/jira/browse/LOG4NET-575">LOG4NET-575</a>]
39+
Addresses CVE-2018-1285 by cherry-picking the fix from
40+
Dominik Psenner, reported by Karthik Balasundaram, as it already
41+
existed in the the develop branch
42+
</li>
43+
</ul>
44+
</section>
45+
</section>
3046

3147
<section id="2.0.9" name="2.0.9">
3248
<p>
@@ -36,8 +52,12 @@ limitations under the License.
3652
</p>
3753
<section id="2.0.9-bug" name="Bug Fixes">
3854
<ul>
39-
<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>
40-
<li>[<a href="https://issues.apache.org/jira/browse/LOG4NET-563">LOG4NET-563</a>] Site styling copied from log4j</li>
55+
<li>[<a href="https://issues.apache.org/jira/browse/LOG4NET-559">LOG4NET-559</a>] Add null
56+
checkes to avoid issues thrown by custom appenders
57+
</li>
58+
<li>[<a href="https://issues.apache.org/jira/browse/LOG4NET-563">LOG4NET-563</a>] Site styling
59+
copied from log4j
60+
</li>
4161
</ul>
4262
</section>
4363
</section>

0 commit comments

Comments
 (0)