Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
add explicit npm run release
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Jun 17, 2016
1 parent 378da43 commit 50c9940
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
1 change: 0 additions & 1 deletion build/tasks/arm-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ gulp.task("test", ["clean"], function(cb) {

gulp.task("deploy-all", ["clean"], function(cb) {
login(() => validateTemplates(() => deployTemplates(() => deleteCurrentTestGroups(() => logout(cb)))));
//login(() => validateTemplates(() => deployTemplates(() => logout(cb))));
});

gulp.task("azure-cleanup", ["clean"], function(cb) {
Expand Down
14 changes: 12 additions & 2 deletions build/tasks/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ var gulp = require("gulp");
var eclint = require("eclint");
var jsonlint = require("gulp-jsonlint");
var zip = require("gulp-zip");
var dateFormat = require("dateformat");
var addsrc = require('gulp-add-src');
var timestamp = require("./lib/timestamp");

gulp.task("default", ["sanity-checks", "patch", "generate-data-nodes-resource"], function() {
var stream = gulp.src(["../src/**/*.json"])
Expand All @@ -17,7 +17,17 @@ gulp.task("default", ["sanity-checks", "patch", "generate-data-nodes-resource"],
}))
.pipe(jsonlint.failAfterError())
.pipe(addsrc.append(["../src/**/*.sh"]))
.pipe(zip("elasticsearch-marketplace" + dateFormat(new Date(), "-yyyymmdd-HHMMss-Z").replace("+","-") +".zip"))
.pipe(zip("elasticsearch-marketplace" + timestamp +".zip"))
.pipe(gulp.dest("../dist/releases"))

stream.on("finish", function() {});

return stream;
});

gulp.task("release", ["default", "deploy-all"], function() {
var stream = gulp.src(["../dist/test-runs/tmp/*.log"])
.pipe(zip("test-results" + timestamp +".zip"))
.pipe(gulp.dest("../dist/releases"))

stream.on("finish", function() {});
Expand Down
7 changes: 7 additions & 0 deletions build/tasks/lib/timestamp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var dateFormat = require("dateformat");
if (!GLOBAL.timestamp)
{
const timestamp = dateFormat(new Date(), "-yyyymmdd-HHMMss-Z").replace("+","-");
GLOBAL.timestamp = timestamp;
}
module.exports = GLOBAL.timestamp;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"main": "index.js",
"private": true,
"scripts": {
"build": "gulp --gulpfile build/gulpfile.js",
"test": "gulp --gulpfile build/gulpfile.js test",
"build": "gulp --gulpfile build/gulpfile.js",
"release": "gulp --gulpfile build/gulpfile.js release",
"headless": "gulp --gulpfile build/gulpfile.js headless",
"azure-cleanup": "gulp --gulpfile build/gulpfile.js azure-cleanup",
"deploy-all": "gulp --gulpfile build/gulpfile.js deploy-all"
Expand Down

0 comments on commit 50c9940

Please sign in to comment.