This repository was archived by the owner on Mar 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGruntfile.js
More file actions
53 lines (48 loc) · 2.15 KB
/
Gruntfile.js
File metadata and controls
53 lines (48 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module.exports = function (grunt) {
grunt.config('build_number', grunt.option('build_number') || process.env.BUILD_NUMBER || 'SNAPSHOT<%= grunt.template.today("yyyymmddHHMMss") %>');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
easy_rpm: {
options: {
name: 'polypus',
summary: 'Polypus',
description: 'Service to register different DataSources connections and queries with parameters.',
version: '<%= pkg.version %>',
release: grunt.config('build_number'),
buildArch: 'noarch',
vendor: 'Logicalis',
group: 'Application',
license: 'Closed',
requires: ["nodejs >= 6.9.1"],
postInstallScript: [
'systemctl daemon-reload'
],
defaultAttributes: {
mode: 644,
// user: 'polypus',
// group: 'polypus',
dirMode: 755
}
},
release: {
files: [
{src: 'app.js', dest: '/opt/polypus/'},
{src: 'config.js', dest: '/opt/polypus/'},
{src: 'package.json', dest: '/opt/polypus/'},
{src: 'lib/**/*', dest: '/opt/polypus/'},
{src: 'scripts/**/*', dest: '/opt/polypus/'},
{src: 'README.md', dest: '/opt/polypus/'},
{src: 'api/**/*', dest: '/opt/polypus/'},
{src: 'pm2.json', dest: '/opt/polypus/'},
{src: 'adapters/**/*', dest: '/opt/polypus/'},
{src: 'config/default.yaml', dest: '/opt/polypus/'},
{src: 'node_modules/**/*', dest: '/opt/polypus/'},
{cwd: "systemd", src: "polypus.service", dest: '/usr/lib/systemd/system/'},
{config: true, cwd: "config", src: 'polypus.yml', dest: '/etc/polypus/'}
]
}
}
});
grunt.loadNpmTasks('grunt-easy-rpm');
grunt.registerTask('default', ['easy_rpm']);
};