1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

modify appxmanifest version on dist

This commit is contained in:
Kyle Spearrin
2017-09-07 10:42:25 -04:00
parent 1b344ade0d
commit e09e15f72f
3 changed files with 23 additions and 3 deletions

View File

@@ -14,7 +14,9 @@
jeditor = require("gulp-json-editor"),
gulpUtil = require('gulp-util'),
child = require('child_process'),
zip = require('gulp-zip');
zip = require('gulp-zip'),
manifest = require('./src/manifest.json'),
xmlpoke = require('gulp-xmlpoke');
var paths = {};
paths.dist = './dist/';
@@ -296,6 +298,23 @@ gulp.task('dist-edge', ['dist'], function (cb) {
.pipe(gulp.dest(paths.dist + 'Extension'))
.on('end', resolve);
});
}).then(function () {
// modify appxmanifest
return new Promise(function (resolve, reject) {
gulp.src(paths.dist + '/AppxManifest.xml')
.pipe(xmlpoke({
replacements: [{
xpath: '/p:Package/p:Identity/@Version',
value: manifest.version + '.0',
namespaces: {
'p': 'http://schemas.microsoft.com/appx/manifest/foundation/windows10'
}
}]
}))
.on('error', reject)
.pipe(gulp.dest(paths.dist))
.on('end', resolve);
});
}).then(function () {
// makeappx.exe must be in your system's path already
child.spawn('makeappx.exe', ['pack', '/h', 'SHA256', '/d', paths.dist, '/p', paths.dist + 'bitwarden.appx']);