浏览代码

Updated zip release task

Torkel Ödegaard 11 年之前
父节点
当前提交
318338f967
共有 3 个文件被更改,包括 12 次插入10 次删除
  1. 2 1
      .gitignore
  2. 1 0
      tasks/distribute_task.js
  3. 9 9
      tasks/options/compress.js

+ 2 - 1
.gitignore

@@ -1,7 +1,8 @@
 node_modules
 coverage/
 .aws-config.json
-dist
+/dist
+/tmp
 
 # locally required config files
 web.config

+ 1 - 0
tasks/distribute_task.js

@@ -4,6 +4,7 @@ module.exports = function(grunt) {
   // build, then zip and upload to s3
   grunt.registerTask('release', [
     'build',
+    'build-post-process',
     'compress:zip_release',
     'compress:tgz_release',
   ]);

+ 9 - 9
tasks/options/compress.js

@@ -2,12 +2,12 @@ module.exports = function(config) {
   return {
     zip: {
       options: {
-        archive: '<%= tempDir %>/<%= pkg.name %>-latest.zip'
+        archive: '<%= destDir %>/<%= pkg.name %>-latest.zip'
       },
       files : [
         {
           expand: true,
-          cwd: '<%= destDir %>',
+          cwd: '<%= tempDir %>',
           src: ['**/*'],
           dest: '<%= pkg.name %>/',
         },
@@ -20,12 +20,12 @@ module.exports = function(config) {
     },
     tgz: {
       options: {
-        archive: '<%= tempDir %>/<%= pkg.name %>-latest.tar.gz'
+        archive: '<%= destDir %>/<%= pkg.name %>-latest.tar.gz'
       },
       files : [
         {
           expand: true,
-          cwd: '<%= destDir %>',
+          cwd: '<%= tempDir %>',
           src: ['**/*'],
           dest: '<%= pkg.name %>/',
         },
@@ -38,12 +38,12 @@ module.exports = function(config) {
     },
     zip_release: {
       options: {
-        archive: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.zip'
+        archive: '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.zip'
       },
       files : [
         {
           expand: true,
-          cwd: '<%= destDir %>',
+          cwd: '<%= tempDir %>',
           src: ['**/*'],
           dest: '<%= pkg.name %>-<%= pkg.version %>/',
         },
@@ -56,12 +56,12 @@ module.exports = function(config) {
     },
     tgz_release: {
       options: {
-        archive: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.tar.gz'
+        archive: '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.tar.gz'
       },
       files : [
         {
           expand: true,
-          cwd: '<%= destDir %>',
+          cwd: '<%= tempDir %>',
           src: ['**/*'],
           dest: '<%= pkg.name %>-<%= pkg.version %>/',
         },
@@ -73,4 +73,4 @@ module.exports = function(config) {
       ]
     }
   };
-};
+};