Class: Push

Inherits:
Array show all
Defined in:
lib/tasks/push.rb

Instance Attribute Summary

Attributes inherited from Array

#env

Instance Method Summary collapse

Methods inherited from Array

#add, #add_passive, #add_quiet, #execute, #has_command?, #initialize, #log_debug_info, #to_html

Constructor Details

This class inherits a constructor from Array

Instance Method Details

#updateObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/tasks/push.rb', line 5

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