From 69766fb8b0a8b6e7305b49b6e363a6b2e8ee60f8 Mon Sep 17 00:00:00 2001 From: Tunghsiao Liu Date: Wed, 1 Jun 2016 20:28:02 +0800 Subject: [PATCH] feat(grunt): add project specific deploy task --- Gruntfile.coffee | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 9273e9615..8cc6e9386 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -623,7 +623,6 @@ module.exports = (grunt) -> "cleanempty" ] - # Release new version grunt.registerTask "release", "Build, bump and commit", (type) -> grunt.task.run [ "bump-only:#{type or 'patch'}" @@ -632,6 +631,17 @@ module.exports = (grunt) -> "bump-commit" ] + grunt.registerTask "deploy-sparanoid", "Deploy to remote server (for sparanoid.com)", -> + if grunt.option("no-commit") + grunt.task.run [ + "shell:amsf__deploy__sparanoid__copy_to_local" + ] + else + grunt.task.run [ + "shell:amsf__deploy__sparanoid__copy_to_local" + "shell:amsf__deploy__sparanoid__auto_commit" + ] + grunt.registerTask "default", "Default task aka. build task", -> grunt.task.run [ "build" @@ -643,12 +653,6 @@ module.exports = (grunt) -> "shell:amsf__deploy__rsync" ] else if grunt.option("deploy") is "sparanoid" - if grunt.option("no-commit") - grunt.task.run [ - "shell:amsf__deploy__sparanoid__copy_to_local" - ] - else - grunt.task.run [ - "shell:amsf__deploy__sparanoid__copy_to_local" - "shell:amsf__deploy__sparanoid__auto_commit" - ] + grunt.task.run [ + "deploy-sparanoid" + ]