diff --git a/README.md b/README.md index 53ae52ea..705c38b6 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,19 @@ This is a collection of demos to help you get familiar with Elasticsearch, Logst You can find specific details for each demo in their respective README. The following information pertains to the demo repo as a whole. +# Contents + +- [Quick start](#quick-start) +- [Contributing](#contributing) + +# Quick start + +You can find the latest release of the demo repo as .zip and .tar.gz files in the "releases" area of this Github repo: + +[https://github.com/elasticsearch/demo/releases](https://github.com/elasticsearch/demo/releases) + +Download a .zip or .tar.gz release, unarchive it, then following instructions in the README file of the demo you're interested in. + # Contributing If you have a bugfix or new demo that you would like to contribute to the Elasticsearch demo repo, please open an issue about it before you start working on it. Talk about what you would like to do. It may be that somebody is already working on it or we can help provide guidance to make it successful. @@ -49,5 +62,5 @@ In order to keep things simple, there will be no concept of branching in this re All releases (major and minor) of the demo repo should be made available in .zip and .tar.gz formats. - +These .zip and .tar.gz distributions can be generated using Gulp. diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 00000000..8cfbdf86 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,38 @@ +var gulp = require('gulp'), + zip = require('gulp-zip'), + tar = require('gulp-tar'), + gzip = require('gulp-gzip'), + del = require('del'), + package = require('./package.json'); + +var version = package.version; + +gulp.task('stage', ['clean-stage'], function(cb) { + return gulp.src(['**/*', '!node_modules/**']) + .pipe(gulp.dest('stage/elasticsearch-demo-' + version)); +}); + +gulp.task('zip', [], function() { + return gulp.src(['stage/**/*']) + .pipe(zip('elasticsearch-demo-' + version + '.zip')) + .pipe(gulp.dest('dist')); +}); + +gulp.task('tar', [], function() { + return gulp.src(['stage/**/*']) + .pipe(tar('elasticsearch-demo-' + version + '.tar')) + .pipe(gzip()) + .pipe(gulp.dest('dist')); +}); + +gulp.task('clean', function(cb) { + del(['dist'], cb) +}); + +gulp.task('clean-stage', function(cb) { + del(['stage'], cb) +}); + +gulp.task('default', ['clean', 'stage'], function() { + gulp.start('zip', 'tar'); +}); diff --git a/package.json b/package.json new file mode 100644 index 00000000..9335081d --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "elasticsearch-demo", + "version": "1.0.0", + "description": "Elasticsearch demos. Helping you get familiar with Elasticsearch, Logstash, and Kibana.", + "main": "gulpfile.js", + "repository": { + "type": "git", + "url": "https://github.com/elasticsearch/demo" + }, + "author": "Elasticsearch", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/elasticsearch/demo/issues" + }, + "homepage": "https://github.com/elasticsearch/demo", + "devDependencies": { + "del": "^1.1.1", + "gulp": "^3.8.10", + "gulp-gzip": "0.0.8", + "gulp-tar": "^1.3.2", + "gulp-zip": "^2.0.2" + } +}