From dad3a74a7f2bf10f17d1ffd80c90ce5261290894 Mon Sep 17 00:00:00 2001 From: ShareLaTeX Date: Thu, 9 Jun 2016 11:36:00 +0000 Subject: [PATCH] add grunt cut task --- server-ce/.gitignore | 1 + server-ce/Gruntfile.coffee | 7 +++++++ server-ce/package.json | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/server-ce/.gitignore b/server-ce/.gitignore index 84b9efb392..023b43469e 100644 --- a/server-ce/.gitignore +++ b/server-ce/.gitignore @@ -1,2 +1,3 @@ node_modules/ api-data +versions/ diff --git a/server-ce/Gruntfile.coffee b/server-ce/Gruntfile.coffee index fad7fc82da..502fc13c36 100644 --- a/server-ce/Gruntfile.coffee +++ b/server-ce/Gruntfile.coffee @@ -3,6 +3,7 @@ services = require('./services') module.exports = (grunt) -> tag = grunt.option("tag") or 'latest' + to = grunt.option("to") or 'latest' repos = [] for service in services url = service.repo.split('/') @@ -29,10 +30,16 @@ module.exports = (grunt) -> src: repos dest: 'versions/' + tag + '.json' + rename: + main: + files: [{ src: ['versions/latest.json'], dest: 'versions/' + to + '.json'}] + grunt.loadNpmTasks 'grunt-docker-io' grunt.loadNpmTasks 'grunt-github-api' + grunt.loadNpmTasks 'grunt-contrib-rename' grunt.registerTask 'build', ['docker_io', 'github'] grunt.registerTask 'gitrev', ['github'] + grunt.registerTask 'cut', ['rename'] grunt.registerTask 'default', ['build'] diff --git a/server-ce/package.json b/server-ce/package.json index 329169d96d..e1efb9b159 100644 --- a/server-ce/package.json +++ b/server-ce/package.json @@ -4,8 +4,9 @@ "description": "none", "dependencies": { "grunt": "^0.4.5", + "grunt-contrib-rename": "0.0.3", "grunt-docker-io": "^0.7.0", - "simple-git": "^1.32.1", - "grunt-github-api": "^0.2.3" + "grunt-github-api": "^0.2.3", + "simple-git": "^1.32.1" } }