Sha256: d28a856f424538574eb90a7d5b7b76bb0f4244ab24f21ef500cf9a9304dd5d5a

Contents?: true

Size: 822 Bytes

Versions: 8

Compression:

Stored size: 822 Bytes

Contents

require_relative '../base/array.rb'
desc 'performs publish commands'
task :publish do Tasks.execute_task :publish; end

class Publish < Array

	def update
		if(File.exists?('.git') && defined?(VERSION))
			add_quiet "<%Git.tag('#{Rake.application.original_dir}','#{VERSION}')%>"
		end

		if(Internet.available?)
			if(File.exists?('.git'))
				if(`git branch`.include?('* master'))
					Dir.glob('*.gemspec').each{|gemspec_file|
						add_passive "gem push #{Gemspec.gemfile(gemspec_file)}" if !Gemspec.published? gemspec_file
					}
				end
			end
			if(File.exists?('.svn'))
				if(`svn info`.include?('/trunk'))
					Dir.glob('*.gemspec').each{|gemspec_file|
						add_quiet "gem push #{Gemspec.gemfile(gemspec_file)}" if !Gemspec.published? gemspec_file
					}
				end
			end
		end
	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dev-2.1.153 lib/tasks/publish.rb
dev-2.1.152 lib/tasks/publish.rb
dev-2.1.151 lib/tasks/publish.rb
dev-2.1.150 lib/tasks/publish.rb
dev-2.1.149 lib/tasks/publish.rb
dev-2.1.148 lib/tasks/publish.rb
dev-2.1.147 lib/tasks/publish.rb
dev-2.1.146 lib/tasks/publish.rb