lib/tasks/push.rb in dev-2.1.153 vs lib/tasks/push.rb in dev-2.1.154

- old
+ new

@@ -1,15 +1,13 @@ -desc 'performs a git push' -task :push do Tasks.execute_task :push;end +# frozen_string_literal: true +desc "performs a git push" +task :push do Tasks.execute_task :push; end + class Push < Array - def update - if(!defined?(NO_PUSH)) - if(File.exists?('.git') && `git config --list`.include?('user.name=')) - if(`git branch`.include?('* master') || `git branch`.include?('* develop')) - add_passive 'git push' - add_passive 'git push --tags' - end - end - end - end -end \ No newline at end of file + def update + if !defined?(NO_PUSH) && (File.exist?(".git") && `git config --list`.include?("user.name=")) && (`git branch`.include?("* master") || `git branch`.include?("* develop")) + add_passive "git push" + add_passive "git push --tags" + end + end +end