diff options
-rw-r--r-- | extension/gulpfile.js | 43 | ||||
-rw-r--r-- | extension/manifest.json | 2 | ||||
-rw-r--r-- | extension/package.json | 1 |
3 files changed, 36 insertions, 10 deletions
diff --git a/extension/gulpfile.js b/extension/gulpfile.js index 925b5149e..9981de939 100644 --- a/extension/gulpfile.js +++ b/extension/gulpfile.js @@ -35,6 +35,7 @@ const fs = require("fs"); const del = require("del"); const through = require('through2'); const File = require('vinyl'); +const jsonTransform = require('gulp-json-transform'); const paths = { ts: { @@ -51,7 +52,6 @@ const paths = { ], }, dist: [ - "manifest.json", "img/*", "style/*.css", "lib/vendor/*", @@ -82,13 +82,13 @@ let manifest; gulp.task("clean", function () { - return del("_build/ext"); + return del("build/ext"); }); gulp.task("dist-prod", ["clean"], function () { return gulp.src(paths.dist, {base: ".", stripBOM: false}) - .pipe(gulp.dest("_build/ext/")); + .pipe(gulp.dest("build/ext/")); }); gulp.task("compile-prod", ["clean"], function () { @@ -101,15 +101,40 @@ gulp.task("compile-prod", ["clean"], function () { tsArgs.sourceMap = undefined; return gulp.src(paths.ts.release) .pipe(ts(tsArgs)) - .pipe(gulp.dest("_build/ext/")); + .pipe(gulp.dest("build/ext/")); }); +gulp.task("manifest-stable", ["clean"], function () { + return gulp.src("manifest.json") + .pipe(jsonTransform((data) => { + data.name = "GNU Taler Wallet (stable)"; + return data; + }, 2)) + .pipe(gulp.dest("build/ext/")); +}); + +gulp.task("manifest-unstable", ["clean"], function () { + return gulp.src("manifest.json") + .pipe(jsonTransform((data) => { + data.name = "GNU Taler Wallet (unstable)"; + return data; + }, 2)) + .pipe(gulp.dest("build/ext/")); +}); + + +gulp.task("package-stable", ["compile-prod", "dist-prod", "manifest-stable"], function () { + let zipname = String.prototype.concat("taler-wallet-stable-", manifest.version, ".zip"); + return gulp.src("build/ext/**", {buffer: false, stripBOM: false}) + .pipe(zip(zipname)) + .pipe(gulp.dest("build/")); +}); -gulp.task("package", ["compile-prod", "dist-prod"], function () { - let zipname = String.prototype.concat("taler-wallet-", manifest.version, ".zip"); - return gulp.src("_build/ext/**", {buffer: false, stripBOM: false}) +gulp.task("package-unstable", ["compile-prod", "dist-prod", "manifest-unstable"], function () { + let zipname = String.prototype.concat("taler-wallet-unstable-", manifest.version, ".zip"); + return gulp.src("build/ext/**", {buffer: false, stripBOM: false}) .pipe(zip(zipname)) - .pipe(gulp.dest("_build/")); + .pipe(gulp.dest("build/")); }); @@ -148,4 +173,4 @@ gulp.task("tsconfig", function() { }); -gulp.task("default", ["package", "tsconfig"]); +gulp.task("default", ["package-stable", "tsconfig"]); diff --git a/extension/manifest.json b/extension/manifest.json index a4f621da4..b228cc0cc 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -1,7 +1,7 @@ { "description": "Privacy preserving and transparent payments", "manifest_version": 2, - "name": "GNU Taler Wallet", + "name": "GNU Taler Wallet (git)", "version": "0.5.5", "applications": { diff --git a/extension/package.json b/extension/package.json index be94e569f..a08fa47ba 100644 --- a/extension/package.json +++ b/extension/package.json @@ -17,6 +17,7 @@ "del": "^2.2.0", "esprima": "^2.7.1", "gulp": "^3.9.0", + "gulp-json-transform": "^0.3.0", "gulp-typescript": "^2.10.0", "gulp-zip": "^3.1.0", "map-stream": "0.0.6", |