Jakefile.publish 678 B

123456789101112131415161718192021222324252627
  1. var fs = require('fs')
  2. , utils = require('utilities');
  3. fs.writeFileSync('package.json', '{"version": "0.0.1"}');
  4. utils.file.mkdirP('tmp_publish');
  5. fs.writeFileSync('tmp_publish/foo.txt', 'FOO');
  6. publishTask('zerb', function () {
  7. this.packageFiles.include([
  8. 'package.json'
  9. , 'tmp_publish/**'
  10. ]);
  11. this.publishCmd = 'node -p -e "\'%filename\'"';
  12. this.gitCmd = 'echo'
  13. this.scheduleDelay = 0;
  14. this._ensureRepoClean = function () {};
  15. this._getCurrentBranch = function () {
  16. return 'v0.0'
  17. };
  18. });
  19. jake.Task['publish'].on('complete', function () {
  20. utils.file.rmRf('tmp_publish', {silent: true});
  21. utils.file.rmRf('package.json', {silent: true});
  22. });