Merge .deb postinst and postinst.oss

This commit is contained in:
Daniel Imms
2016-04-01 12:33:50 -07:00
parent e4d6038750
commit ba6f665c6d
3 changed files with 24 additions and 40 deletions

View File

@@ -292,23 +292,14 @@ function prepareDebPackage(arch) {
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename('DEBIAN/prerm'))
var all = es.merge(control, prerm, desktop, icon, shortcut, code);
var postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@ARCHITECTURE@@', debArch))
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
.pipe(rename('DEBIAN/postinst'))
// Register an apt repository if this is an official build
if (product.updateUrl && product.quality) {
var postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@UPDATEURL@@', product.updateUrl))
.pipe(replace('@@QUALITY@@', product.quality))
.pipe(replace('@@ARCHITECTURE@@', debArch))
.pipe(rename('DEBIAN/postinst'))
all = es.merge(all, postinst);
} else {
var postinst = gulp.src('resources/linux/debian/postinst.oss.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename('DEBIAN/postinst'))
all = es.merge(all, postinst);
}
var all = es.merge(control, postinst, prerm, desktop, icon, shortcut, code);
return all.pipe(symdest(destination));
};