diff --git a/Gruntfile.js b/Gruntfile.js index b368b31086..ddd06168a6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,8 +12,10 @@ adminAssets: './core/admin/assets', build: buildDirectory, nightlyBuild: path.join(buildDirectory, 'nightly'), + buildBuild: path.join(buildDirectory, 'build'), dist: distDirectory, - nightlyDist: path.join(distDirectory, 'nightly') + nightlyDist: path.join(distDirectory, 'nightly'), + buildDist: path.join(distDirectory, 'build') }, pkg: grunt.file.readJSON('package.json'), @@ -127,14 +129,42 @@ ], dest: "<%= paths.nightlyBuild %>/<%= pkg.version %>/" }] + }, + build: { + files: [{ + expand: true, + src: [ + '**', + '!node_modules/**', + '!core/shared/data/*.db', + '!.sass*', + '!.af*', + '!.git*', + '!.groc*', + '!.travis.yml' + ], + dest: "<%= paths.buildBuild %>/" + }] } }, - zip: { + + compress: { nightly: { + options: { + archive: "<%= paths.nightlyDist %>/Ghost-Nightly-<%= pkg.version %>.zip" + }, + expand: true, cwd: "<%= paths.nightlyBuild %>/<%= pkg.version %>/", - src: ["<%= paths.nightlyBuild %>/<%= pkg.version %>/**"], - dest: "<%= paths.nightlyDist %>/Ghost-Nightly-<%= pkg.version %>.zip" + src: ["**"] + }, + build: { + options: { + archive: "<%= paths.buildDist %>/Ghost-Build.zip" + }, + expand: true, + cwd: "<%= paths.buildBuild %>/", + src: ["**"] } } }; @@ -145,8 +175,8 @@ grunt.loadNpmTasks("grunt-mocha-test"); grunt.loadNpmTasks("grunt-shell"); grunt.loadNpmTasks("grunt-bump"); - grunt.loadNpmTasks("grunt-zip"); + grunt.loadNpmTasks("grunt-contrib-compress"); grunt.loadNpmTasks("grunt-contrib-copy"); grunt.loadNpmTasks("grunt-contrib-watch"); grunt.loadNpmTasks("grunt-contrib-sass"); @@ -182,13 +212,14 @@ * - TODO: POST to pubsubhubub to notify of new build? */ grunt.registerTask("nightly", [ + "shell:bourbon", "sass:admin", "handlebars", "validate", "bump", "updateCurrentPackageInfo", "copy:nightly", - "zip:nightly" + "compress:nightly" /* Caution: shit gets real below here */ //"shell:commitNightly", //"shell:tagNightly", @@ -196,6 +227,14 @@ //"shell:pushMasterTags" ]); + grunt.registerTask("build", [ + "shell:bourbon", + "sass:admin", + "handlebars", + "copy:build", + "compress:build" + ]); + // When you just say "grunt" grunt.registerTask("default", ['sass:admin', 'handlebars']); }; diff --git a/package.json b/package.json index 2f7cb0b305..905a1a9fbe 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "grunt-contrib-handlebars": "~0.5.9", "grunt-contrib-watch": "~0.4.4", "grunt-bump": "0.0.2", - "grunt-zip": "~0.9.0", "grunt-contrib-copy": "~0.4.1", + "grunt-contrib-compress": "~0.5.2", "mocha-as-promised": "~1.4.0" } }