Sha256: b1d1d2fad9a652a0fe9768c6a93aa26f984c6df6a43185ac075f4f92af00c7c4
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 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) || dest.include?('0.0')) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dev-2.0.294 | lib/tasks/publish.rb |
dev-2.0.291 | lib/tasks/publish.rb |