Improvement - 335 - Automation build macos

This commit is contained in:
Jean-Baptiste Dominguez 2018-05-29 18:18:14 +09:00
commit dae994007e
3 changed files with 17 additions and 3 deletions

View file

@ -3,11 +3,21 @@
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('grunt-curl')(grunt);
// Project Configuration
grunt.initConfig({
curl: {
'./cache/nwjs.zip': 'https://dl.nwjs.io/v0.19.5-mas-beta/nwjs-mas-v0.19.5-osx-x64.zip',
},
unzip: {
'./cache/': './cache/nwjs.zip'
},
pkg: grunt.file.readJSON('package.json'),
exec: {
replaceNWJS: {
command: 'rm -R ./cache/0.19.5/osx64/nwjs.app; cp -R ./cache/nwjs-mas-v0.19.5-osx-x64/nwjs.app ./cache/0.19.5/osx64/'
},
appConfig: {
command: 'node ./util/buildAppConfig.js'
},
@ -240,6 +250,7 @@ module.exports = function(grunt) {
'CFBundleIdentifier': 'com.bitcoin.mwallet.mac',
'CFBundleDisplayName': '<%= pkg.title %>',
'CFBundleShortVersionString': '<%= pkg.version %>',
'CFBundleVersion': '<%= pkg.androidVersion %>',
'LSApplicationCategoryType': 'public.app-category.finance',
'CFBundleURLTypes': [
{
@ -276,7 +287,7 @@ module.exports = function(grunt) {
grunt.registerTask('default', ['nggettext_compile', 'exec:appConfig', 'exec:externalServices', 'browserify', 'sass', 'concat', 'copy:ionic_fonts', 'copy:ionic_js']);
grunt.registerTask('prod', ['default', 'uglify']);
grunt.registerTask('translate', ['nggettext_extract']);
grunt.registerTask('desktop', ['prod', 'nwjs', 'copy:linux', 'compress:linux']);
grunt.registerTask('desktop', ['prod', 'nwjs', 'fix-nwjs-macos', 'nwjs', 'copy:linux', 'compress:linux']);
grunt.registerTask('osx', ['prod', 'nwjs', 'exec:macos', 'exec:osxsign']);
grunt.registerTask('osx-debug', ['default', 'nwjs']);
grunt.registerTask('chrome', ['default','exec:chrome']);
@ -291,5 +302,6 @@ module.exports = function(grunt) {
grunt.registerTask('android', ['exec:android']);
grunt.registerTask('android-release', ['prod', 'exec:android', 'exec:androidsign']);
grunt.registerTask('desktopsign', ['exec:desktopsign', 'exec:desktopverify']);
grunt.registerTask('fix-nwjs-macos', ['curl', 'unzip', 'exec:replaceNWJS']);
};

View file

@ -70,6 +70,8 @@
"grunt-angular-gettext": "^2.2.3",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.2.0",
"grunt-curl": "^2.4.1",
"grunt-zip": "^0.17.1",
"grunt-contrib-compress": "^1.3.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",

View file

@ -11,7 +11,7 @@
<link rel="stylesheet" type="text/css" href="css/chartist.css">
<link rel="stylesheet" type="text/css" href="css/bitcoin.com.css">
<link rel="stylesheet" type="text/css" href="css/icomoon.css">
<title>Bitcoin.com - Bitcoin.com Wallet</title>
<title>Bitcoin.com Wallet</title>
<link rel="shortcut icon" href="img/app/favicon.ico">
</head>
<body>