Gruntfile.coffee 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. services = require('./services')
  2. module.exports = (grunt) ->
  3. tag = grunt.option("tag") or 'latest'
  4. repos = []
  5. for service in services
  6. url = service.repo.split('/')
  7. owner = url[3]
  8. repo = url[4].replace('.git','')
  9. repos.push "/repos/#{owner}/#{repo}/git/refs/heads/#{service.version}"
  10. grunt.initConfig
  11. docker_io:
  12. default_options:
  13. options:
  14. dockerFileLocation: '.'
  15. buildName: 'sharelatex'
  16. tag: grunt.option('tag') or 'latest'
  17. push: grunt.option('push') or false
  18. force: true
  19. github:
  20. combinedRevisions:
  21. options:
  22. #oAuth:
  23. # access_token: ''
  24. concat: true
  25. src: repos
  26. dest: 'versions/' + tag + '.json'
  27. grunt.loadNpmTasks 'grunt-docker-io'
  28. grunt.loadNpmTasks 'grunt-github-api'
  29. grunt.registerTask 'build', ['docker_io', 'github']
  30. grunt.registerTask 'gitrev', ['github']
  31. grunt.registerTask 'default', ['build']