diff --git a/Gruntfile.js b/Gruntfile.js index 361fa4f81f..2e8afec952 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -150,6 +150,27 @@ module.exports = function (grunt) { dest: 'build/EspoCRM-<%= pkg.version %>/', }, }, + chmod: { + options: { + mode: '755' + }, + php: { + options: { + mode: '644' + }, + src: [ + 'build/EspoCRM-<%= pkg.version %>/**/*.php', + 'build/EspoCRM-<%= pkg.version %>/**/*.json', + 'build/EspoCRM-<%= pkg.version %>/**/*.config', + 'build/EspoCRM-<%= pkg.version %>/**/.htaccess', + 'build/EspoCRM-<%= pkg.version %>/client/**/*.js', + 'build/EspoCRM-<%= pkg.version %>/client/**/*.css', + 'build/EspoCRM-<%= pkg.version %>/client/**/*.tpl', + 'build/EspoCRM-<%= pkg.version %>/**/*.html', + 'build/EspoCRM-<%= pkg.version %>/**/*.txt', + ] + } + }, replace: { timestamp: { options: { @@ -205,6 +226,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-replace'); grunt.loadNpmTasks('grunt-contrib-compress'); + grunt.loadNpmTasks('grunt-chmod'); grunt.registerTask('default', [ 'clean:start', @@ -218,8 +240,8 @@ module.exports = function (grunt) { 'copy:backend', 'replace', 'copy:final', + 'chmod', 'clean:final', - //'compress', ]); }; diff --git a/package.json b/package.json index 71d719e766..c783863fbd 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "license": "GPL", "devDependencies": { "grunt": "~0.4.1", - "grunt-contrib-copy": "~0.4.1", + "grunt-contrib-copy": "~0.5.0", "grunt-contrib-clean": "~0.5.0", "grunt-replace": "~0.5.1", "grunt-contrib-concat": "~0.3.0", @@ -16,6 +16,7 @@ "grunt-contrib-cssmin": "~0.6.2", "grunt-contrib-less": "~0.7.0", "grunt-mkdir": "~0.1.1", - "grunt-contrib-compress": "~0.8.0" + "grunt-contrib-compress": "~0.8.0", + "grunt-chmod": "~1.0.3" } }