Sha256: 61a7e49b2db839764ad59ee6eddaf199a9df4cdbb7d00b7cbcefdec3ff1d1fa1

Contents?: true

Size: 1.09 KB

Versions: 78

Compression:

Stored size: 1.09 KB

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

		Dir.glob("#{Rake.application.original_dir}/**/*.{nupkg,msi,gem}").each{|publish_file|
			dest="#{Environment.default.publish_dir}/#{File.basename(publish_file)}"
			add_quiet "<%FileUtils.cp('#{publish_file}','#{dest}')%>" if(!File.exists?(dest) && !publish_file.include?('packages/'))
		}
	end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
dev-2.1.76 lib/tasks/publish.rb
dev-2.1.70 lib/tasks/publish.rb
dev-2.1.69 lib/tasks/publish.rb
dev-2.1.68 lib/tasks/publish.rb
dev-2.1.67 lib/tasks/publish.rb
dev-2.1.66 lib/tasks/publish.rb
dev-2.1.65 lib/tasks/publish.rb
dev-2.1.64 lib/tasks/publish.rb
dev-2.1.63 lib/tasks/publish.rb
dev-2.1.62 lib/tasks/publish.rb
dev-2.1.61 lib/tasks/publish.rb
dev-2.1.60 lib/tasks/publish.rb
dev-2.1.59 lib/tasks/publish.rb
dev-2.1.58 lib/tasks/publish.rb
dev-2.1.57 lib/tasks/publish.rb
dev-2.1.56 lib/tasks/publish.rb
dev-2.1.55 lib/tasks/publish.rb
dev-2.1.54 lib/tasks/publish.rb
dev-2.1.53 lib/tasks/publish.rb
dev-2.1.52 lib/tasks/publish.rb