Skip to content

Commit

Permalink
Remove ARMv6 from releases starting v12.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fhemberger committed Apr 24, 2019
1 parent 4c47e8b commit c24054d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
11 changes: 8 additions & 3 deletions layouts/partials/primary-download-matrix.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@
</tr>
<tr>
<th>{{downloads.LinuxBinaries}} (ARM)</th>
<td colspan="2"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-armv6l.tar.xz">ARMv6</a></td>
<td colspan="2"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-armv7l.tar.xz">ARMv7</a></td>
<td colspan="2"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-arm64.tar.xz">ARMv8</a></td>
{{#semver-gte version.node "12.0.0"}}
<td colspan="3"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-armv7l.tar.xz">ARMv7</a></td>
<td colspan="3"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-arm64.tar.xz">ARMv8</a></td>
{{else}}
<td colspan="2"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-armv6l.tar.xz">ARMv6</a></td>
<td colspan="2"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-armv7l.tar.xz">ARMv7</a></td>
<td colspan="2"><a href="https://nodejs.org/dist/{{version.node}}/node-{{version.node}}-linux-arm64.tar.xz">ARMv8</a></td>
{{/semver-gte}}
</tr>

<tr>
Expand Down
5 changes: 5 additions & 0 deletions scripts/helpers/downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ module.exports = (version) => {
downloads = downloads.filter(ver =>
ver.title !== 'Linux 32-bit Binary' &&
ver.title !== 'SmartOS 32-bit Binary')
} else if (semver.satisfies(version, '>= 12.0.0')) {
downloads = downloads.filter(ver =>
ver.title !== 'Linux 32-bit Binary' &&
ver.title !== 'SmartOS 32-bit Binary' &&
ver.title !== 'ARMv6 32-bit Binary')
}
return downloads.map((item) => resolveUrl(item, version))
}
11 changes: 11 additions & 0 deletions scripts/helpers/semver-gte.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict'

const semver = require('semver')

module.exports = function (a, b, options) {
if (arguments.length === 2) {
options = b
b = options.hash.compare
}
return semver.gte(a, b) ? options.fn(this) : options.inverse(this)
}

0 comments on commit c24054d

Please sign in to comment.