distribute_task.js 774 B

12345678910111213141516171819202122232425262728293031
  1. module.exports = function(grunt) {
  2. // build, then zip and upload to s3
  3. grunt.registerTask('distribute', [
  4. 'distribute:load_s3_config',
  5. 'build',
  6. 'compress:zip',
  7. 'compress:tgz',
  8. 's3:dist',
  9. 'clean:temp'
  10. ]);
  11. // build, then zip and upload to s3
  12. grunt.registerTask('release', [
  13. // 'distribute:load_s3_config',
  14. 'build',
  15. 'compress:zip_release',
  16. 'compress:tgz_release',
  17. //'s3:release',
  18. //'clean:temp'
  19. ]);
  20. // collect the key and secret from the .aws-config.json file, finish configuring the s3 task
  21. grunt.registerTask('distribute:load_s3_config', function () {
  22. var config = grunt.file.readJSON('.aws-config.json');
  23. grunt.config('s3.options', {
  24. key: config.key,
  25. secret: config.secret
  26. });
  27. });
  28. }