Sha256: 6d048c74a8391bc308743b629349f4bd06760702c8782ee72cf5d9e8b1671b72

Contents?: true

Size: 1.1 KB

Versions: 24

Compression:

Stored size: 1.1 KB

Contents

puts __FILE__ if defined?(DEBUG)

desc 'performs publish commands'
task :publish do Tasks.execute_task :publish; end

class Publish < Array
	def update

		if(File.exists?('.git') && defined?(VERSION))
			add "<%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 "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 "gem push #{Gemspec.gemfile(gemspec_file)}" if !Gemspec.published? gemspec_file
					}
				end
			end
		end
		Dir.glob('**/*.{nupkg,msi,gem}').each{|publish_file|
			dest="#{Environment.dev_root}/publish/#{File.basename(publish_file)}"
			FileUtils.mkdir_p("#{Environment.dev_root}/publish") if !File.exists?("#{Environment.dev_root}/publish")
			add "<%FileUtils.cp('#{publish_file}','#{dest}')%>" if(!File.exists?(dest))
		}
	end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
dev-2.0.219 lib/tasks/publish.rb
dev-2.0.217 lib/tasks/publish.rb
dev-2.0.216 lib/tasks/publish.rb
dev-2.0.215 lib/tasks/publish.rb
dev-2.0.214 lib/tasks/publish.rb
dev-2.0.213 lib/tasks/publish.rb
dev-2.0.212 lib/tasks/publish.rb
dev-2.0.211 lib/tasks/publish.rb
dev-2.0.210 lib/tasks/publish.rb
dev-2.0.209 lib/tasks/publish.rb
dev-2.0.208 lib/tasks/publish.rb
dev-2.0.207 lib/tasks/publish.rb
dev-2.0.206 lib/tasks/publish.rb
dev-2.0.205 lib/tasks/publish.rb
dev-2.0.204 lib/tasks/publish.rb
dev-2.0.203 lib/tasks/publish.rb
dev-2.0.202 lib/tasks/publish.rb
dev-2.0.201 lib/tasks/publish.rb
dev-2.0.200 lib/tasks/publish.rb
dev-2.0.199 lib/tasks/publish.rb