lib/dev_flow/commands/complete.rb in dev_flow-0.2.4 vs lib/dev_flow/commands/complete.rb in dev_flow-0.3.0

- old
+ new

@@ -6,11 +6,10 @@ # whether I am working on a proper task branch current_task = self.task error "Not on a known task branch. Can not continue." unless current_task - info "Assigned resources for current task: " + current_task.resources.join(", ") info "Task resource list are #{current_task.resources.join(',')}, you are #{@config["whoami"]}" unless current_task.resources.include?(@config["whoami"]) if i_have_power? role = 'supervisor' if i_am_supervisor? role = 'moderator' if i_am_moderator? @@ -19,23 +18,22 @@ else error "You are not in the resource list for that task." end end - self.ask_rebase true # force rebase + error "Can not work offline for complete a task" unless sync? + self.ask_rebase puts hr # commit you current branch and push progress = 99 message = ARGV[2] || "complete the branch by set progress to 99." message = "[complete] " + message info "Commit your progress" `git commit -am '#{message}'` - if @config["git_remote"] - info "push your progress to remote server" - `git push #{@config["git_remote"]} #{current_task.branch_name}` - end + info "Push your progress to remote server" + `git push #{@config["git_remote"]} #{current_task.branch_name}` # rewrite progress in ROADMAP file under develop trunk upload_progress! current_task, progress, true end