Generate rpm dependencies (#143415)

* Commit non-py files

* Finish porting calculate and merge scripts for rpm

* Switch back to ts, add binaryDir

* Pass in app path

* Trim string before splitting

* Move files, apply PR feedback

* Add deps to exclude and crashpad handler dep

* polish
This commit is contained in:
Raymond Zhao
2022-03-17 21:57:25 -07:00
committed by GitHub
parent 3ffbbe7413
commit d572d6e9d1
6 changed files with 233 additions and 187 deletions

View File

@@ -15,7 +15,7 @@ const util = require('./lib/util');
const task = require('./lib/task');
const packageJson = require('../package.json');
const product = require('../product.json');
const rpmDependencies = require('../resources/linux/rpm/dependencies.json');
const rpmDependenciesGenerator = require('./linux/rpm/dependencies-generator');
const path = require('path');
const root = path.dirname(__dirname);
const commit = util.getVersion(root);
@@ -176,6 +176,7 @@ function prepareRpmPackage(arch) {
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = 'BUILD/usr/share/' + product.applicationName + '/' + p.dirname; }));
const dependencies = rpmDependenciesGenerator.getDependencies(binaryDir, product.applicationName);
const spec = gulp.src('resources/linux/rpm/code.spec.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@NAME_LONG@@', product.nameLong))
@@ -186,7 +187,7 @@ function prepareRpmPackage(arch) {
.pipe(replace('@@LICENSE@@', product.licenseName))
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
.pipe(replace('@@DEPENDENCIES@@', rpmDependencies[rpmArch].join(', ')))
.pipe(replace('@@DEPENDENCIES@@', dependencies.join(', ')))
.pipe(rename('SPECS/' + product.applicationName + '.spec'));
const specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' })