forked from MailFred/extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
105 lines (87 loc) · 2.17 KB
/
Gruntfile.js
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* global require */
module.exports = function(grunt) {
'use strict';
var releasePath = "./build/<%= pkg.name %>-<%= manifest.version %>.zip";
var pkg = grunt.file.readJSON('package.json');
var firefoxPackage = grunt.file.readJSON('firefox/package.json');
var firefoxReleaseName = grunt.template.process("<%= name %>-<%= version %>.xpi", {
data: firefoxPackage
});
grunt.initConfig({
shared: {
releasePath: releasePath,
firefox: {
path: './build/firefox/',
file: firefoxReleaseName
}
},
pkg: pkg,
manifest: grunt.file.readJSON('chrome/manifest.json'),
firefoxPackage: firefoxPackage
});
require('load-grunt-config')(grunt);
grunt.registerTask('dev', [
'build:sources',
'copy',
'watch'
]);
grunt.registerTask('build:sources', [
'coffee',
'uglify',
'less'
]);
grunt.registerTask('build:all', [
'clean:all',
'i18n',
'build:sources',
'copy',
'env:ff',
'shell:update-max-version-cfx',
'mozilla-cfx-xpi',
'crx'
]);
grunt.registerTask('beta', [
'webstore_upload:beta'
]);
grunt.registerTask('release:prepare', [
'build:all',
'shell:sign-xpi',
'shell:update-rdf',
'shell:generate-htaccess'
]);
grunt.registerTask('release:upload:firefox', [
'ftp-deploy:firefox-release'
]);
grunt.registerTask('release:upload:chrome', [
'webstore_upload:release'
]);
grunt.registerTask('release', [
'release:prepare',
'release:upload:firefox',
'release:upload:chrome'
]);
grunt.registerTask('travis', [
'setup',
'e2e:remote'
]);
grunt.registerTask('setup', [
'mozilla-addon-sdk:latest',
'curl:amo'
]);
grunt.registerTask('default', 'setup');
grunt.registerTask("e2e:local", [
'build:all',
"protractor_webdriver:general",
"protractor:chrome",
"protractor:firefox"
]);
grunt.registerTask("e2e:remote", [
'build:all',
"protractor:firefox.remote",
"protractor:chrome.remote"
]);
grunt.registerTask('i18n', [
'crowdin-request:download',
'copy-crowdin-files'
]);
};