Skip to content

Commit

Permalink
Consistent build archives
Browse files Browse the repository at this point in the history
We do not release zip archives for any operating system except windows,
and we do not release tar.gz archives for windows. For consistency and
clarity sake, we'll explicitly list the architecture (x86) of the
windows build as well.
  • Loading branch information
epixa committed Jul 6, 2016
1 parent f23d98e commit 2f2742e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ For the daring, snapshot builds are available. These builds are created after ea
| OSX | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-darwin-x64.tar.gz) |
| Linux x64 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-linux-x64.tar.gz) [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-amd64.deb) [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-x86_64.rpm) |
| Linux x86 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-linux-x86.tar.gz) [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-i386.deb) [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-i686.rpm) |
| Windows | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-windows.zip) |
| Windows | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-alpha5-SNAPSHOT-windows-x86.zip) |
10 changes: 3 additions & 7 deletions tasks/build/archives.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = function createPackages(grunt) {
let { config } = grunt;
let { resolve, relative } = require('path');
let { resolve } = require('path');
let { execFile } = require('child_process');
let { all, fromNode } = require('bluebird');

Expand All @@ -13,14 +13,10 @@ module.exports = function createPackages(grunt) {


let archives = async (platform) => {
// kibana.tar.gz
await exec('tar', ['-zchf', relative(buildPath, platform.tarPath), platform.buildName]);

// kibana.zip
if (/windows/.test(platform.name)) {
await exec('zip', ['-rq', '-ll', relative(buildPath, platform.zipPath), platform.buildName]);
await exec('zip', ['-rq', '-ll', platform.zipPath, platform.buildName]);
} else {
await exec('zip', ['-rq', relative(buildPath, platform.zipPath), platform.buildName]);
await exec('tar', ['-zchf', platform.tarPath, platform.buildName]);
}
};

Expand Down
2 changes: 1 addition & 1 deletion tasks/build/download_node_builds.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = function (grunt) {
platform.downloadPromise = (async function () {
grunt.file.mkdir(downloadDir);

if (platform.name === 'windows') {
if (platform.win) {
await fromNode(cb => {
resp
.pipe(createWriteStream(resolve(downloadDir, 'node.exe')))
Expand Down
4 changes: 2 additions & 2 deletions tasks/config/platforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ module.exports = function (grunt) {
'darwin-x64',
'linux-x64',
'linux-x86',
'windows'
'windows-x86'
].map(function (name) {
let win = name === 'windows';
let win = name === 'windows-x86';

let nodeUrl = win ? `${baseUri}/win-x86/node.exe` : `${baseUri}/node-v${nodeVersion}-${name}.tar.gz`;
let nodeDir = resolve(rootPath, `.node_binaries/${nodeVersion}/${name}`);
Expand Down

0 comments on commit 2f2742e

Please sign in to comment.