Sha256: d28de977230c338685100a17c6697e3900fe21795773d77b58fb6141e9d19e9d

Contents?: true

Size: 1.35 KB

Versions: 40

Compression:

Stored size: 1.35 KB

Contents

puts __FILE__ if defined?(DEBUG)

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

class Publish < Array
	def update

        FileUtils.mkdir_p("#{Environment.dev_root}/publish") if !File.exists?("#{Environment.dev_root}/publish")
		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

		puts 'publish glob, checking...' if defined? DEBUG
		Dir.glob("#{Rake.application.original_dir}/**/*.{nupkg,msi,gem}").each{|publish_file|
			puts "checking #{publish_file}" if defined? DEBUG
			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

40 entries across 40 versions & 1 rubygems

Version Path
dev-2.0.268 lib/tasks/publish.rb
dev-2.0.267 lib/tasks/publish.rb
dev-2.0.266 lib/tasks/publish.rb
dev-2.0.265 lib/tasks/publish.rb
dev-2.0.264 lib/tasks/publish.rb
dev-2.0.263 lib/tasks/publish.rb
dev-2.0.262 lib/tasks/publish.rb
dev-2.0.261 lib/tasks/publish.rb
dev-2.0.260 lib/tasks/publish.rb
dev-2.0.259 lib/tasks/publish.rb
dev-2.0.258 lib/tasks/publish.rb
dev-2.0.257 lib/tasks/publish.rb
dev-2.0.256 lib/tasks/publish.rb
dev-2.0.255 lib/tasks/publish.rb
dev-2.0.254 lib/tasks/publish.rb
dev-2.0.253 lib/tasks/publish.rb
dev-2.0.252 lib/tasks/publish.rb
dev-2.0.251 lib/tasks/publish.rb
dev-2.0.250 lib/tasks/publish.rb
dev-2.0.249 lib/tasks/publish.rb