From b6304a04e68bfbcdf44d2280bb2c6680d8abbca3 Mon Sep 17 00:00:00 2001 From: Kazuhisa Hara Date: Wed, 25 Jan 2017 21:14:30 +0900 Subject: [PATCH] add rpm support Make it able to build rpm package using grunt-electron-installer-redhat. https://www.npmjs.com/package/grunt-electron-installer-redhat Signed-off-by: Kazuhisa Hara --- gruntfile.js | 22 +++++++++++++++++++++- package.json | 3 ++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index 82f51bbc..5bc84022 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -50,6 +50,25 @@ module.exports = function (grunt) { src: path.join(__dirname, 'dist', 'Boostnote-linux-x64'), dest: path.join(__dirname, 'dist') } + }, + 'electron-installer-redhat': { + app: { + options: { + name: 'boostnote', + productName: 'Boostnote', + genericName: 'Boostnote', + productDescription: 'The opensource note app for developer.', + arch: 'x86_64', + categories: [ + 'Development', + 'Utility' + ], + icon: path.join(__dirname, 'resources/app.png'), + bin: 'Boostnote' + }, + src: path.join(__dirname, 'dist', 'Boostnote-linux-x64'), + dest: path.join(__dirname, 'dist') + } } } @@ -57,6 +76,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-electron-installer') if (!WIN) { grunt.loadNpmTasks('grunt-electron-installer-debian') + grunt.loadNpmTasks('grunt-electron-installer-redhat') } grunt.registerTask('compile', function () { @@ -244,7 +264,7 @@ module.exports = function (grunt) { grunt.task.run(['compile', 'pack:osx', 'codesign', 'create-osx-installer', 'zip:osx']) break case 'linux': - grunt.task.run(['compile', 'pack:linux', 'electron-installer-debian']) + grunt.task.run(['compile', 'pack:linux', 'electron-installer-debian', 'electron-installer-redhat']) break } }) diff --git a/package.json b/package.json index 7a0df7c8..babd37fa 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,8 @@ "webpack-dev-server": "^1.12.0" }, "optionalDependencies": { - "grunt-electron-installer-debian": "^0.2.0" + "grunt-electron-installer-debian": "^0.2.0", + "grunt-electron-installer-redhat": "^0.3.1" }, "optional": false, "ava": {