mirror of
https://github.com/moparisthebest/mail
synced 2024-12-23 07:48:48 -05:00
refactor build process to onyl deploy TEST and STABLE
This commit is contained in:
parent
082a12ed19
commit
d9473a1ddb
32
Gruntfile.js
32
Gruntfile.js
@ -1,7 +1,8 @@
|
||||
module.exports = function(grunt) {
|
||||
'use strict';
|
||||
|
||||
var version = grunt.option('release');
|
||||
var version = grunt.option('release'),
|
||||
zipName = (version) ? version : 'DEV';
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
@ -206,7 +207,7 @@ module.exports = function(grunt) {
|
||||
main: {
|
||||
options: {
|
||||
mode: 'zip',
|
||||
archive: (version) ? version + '.zip' : 'release.zip'
|
||||
archive: zipName + '.zip'
|
||||
},
|
||||
expand: true,
|
||||
cwd: 'dist/',
|
||||
@ -234,7 +235,6 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('dist-css', ['sass', 'autoprefixer', 'csso']);
|
||||
grunt.registerTask('dist-copy', ['copy']);
|
||||
grunt.registerTask('dist', ['clean', 'dist-npm', 'dist-css', 'dist-copy']);
|
||||
grunt.registerTask('default', ['dist']);
|
||||
|
||||
// Test/Dev tasks
|
||||
grunt.registerTask('dev', ['connect:dev']);
|
||||
@ -248,16 +248,29 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('manifest-dev', function() {
|
||||
patchManifest({
|
||||
suffix: ' (DEV)',
|
||||
client_id: '440907777130-bfpgo5fbo4f7hetrg3hn57qolrtubs0u.apps.googleusercontent.com'
|
||||
version: '9999.9999.9999.9999'
|
||||
});
|
||||
});
|
||||
grunt.registerTask('manifest-test', function() {
|
||||
if (!version) {
|
||||
throw new Error('You must specify the version: "--release=1.0"');
|
||||
}
|
||||
|
||||
patchManifest({
|
||||
suffix: ' (Alpha)'
|
||||
suffix: ' (TEST)',
|
||||
client_id: '440907777130-bfpgo5fbo4f7hetrg3hn57qolrtubs0u.apps.googleusercontent.com',
|
||||
version: version
|
||||
});
|
||||
});
|
||||
grunt.registerTask('manifest-stable', function() {
|
||||
patchManifest({});
|
||||
if (!version) {
|
||||
throw new Error('You must specify the version: "--release=1.0"');
|
||||
}
|
||||
|
||||
patchManifest({
|
||||
suffix: ' (Alpha)',
|
||||
version: version
|
||||
});
|
||||
});
|
||||
|
||||
function patchManifest(options) {
|
||||
@ -265,11 +278,9 @@ module.exports = function(grunt) {
|
||||
path = './dist/manifest.json',
|
||||
manifest = require(path);
|
||||
|
||||
if (!version) {
|
||||
throw new Error('You must specify the version: "--release=1.0"');
|
||||
if (options.version) {
|
||||
manifest.version = options.version;
|
||||
}
|
||||
|
||||
manifest.version = version;
|
||||
if (options.suffix) {
|
||||
manifest.name += options.suffix;
|
||||
}
|
||||
@ -284,5 +295,6 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('release-dev', ['dist', 'manifest-dev', 'compress']);
|
||||
grunt.registerTask('release-test', ['dist', 'manifest-test', 'compress']);
|
||||
grunt.registerTask('release-stable', ['dist', 'manifest-stable', 'compress']);
|
||||
grunt.registerTask('default', ['release-dev']);
|
||||
|
||||
};
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Whiteout Mail",
|
||||
"description": "Simple & elegant email client with integrated end-to-end encryption. Keeping your emails safe has never been so easy.",
|
||||
"version": "9999.9999.9999.9999",
|
||||
"version": "x.x.x.x",
|
||||
"manifest_version": 2,
|
||||
"offline_enabled": true,
|
||||
"icons": {
|
||||
|
Loading…
Reference in New Issue
Block a user