Sha256: 35de6612049ef95dbb187d14bf8f313ec918c01d4f02dfcb4cf29db57389e29d
Contents?: true
Size: 1.33 KB
Versions: 9
Compression:
Stored size: 1.33 KB
Contents
require "rake" require "fileutils" require "dtc_rake/config" require "dtc_rake/product" require "dtc_rake/ui" require "dtc_rake/util" include DtcRake::UI product = DtcRake::Product.instance if product.has_gem namespace :upload do desc <<-DESC.gsub(/^ {4}/, '') Uploads pack with command client yardoc to appbox artifact; requires path to password file. rake upload:yardoc DTC_RAKE_PASSWD=12-345-6 ("~/.uu/12-345-6" will be used) rake upload:yardoc DTC_RAKE_PASSWD=/path/to/12-345-6 (password file from the specified path will be used) DESC task :yardoc => ["build:yardoc"] do error("Specify password file in env variable DTC_RAKE_PASSWD, e.g. rake upload:yardoc DTC_RAKE_PASSWD=12-345-6") unless ENV["DTC_RAKE_PASSWD"] pack_file = File.join(DtcRake::Config.instance.output_dir, product.yardoc_file_name) error("File #{pack_file} does not exist") unless File.file?(pack_file) art_uri = product.appbox_uri attch_code = product.yardoc_attachment_code announce "Uploading #{pack_file} to #{art_uri}:#{attch_code}..." attch_uri = DtcRake.upload_pack( file: pack_file, appbox_uri: art_uri, attachment_code: attch_code, credentials: ENV["DTC_RAKE_PASSWD"] ) success "File #{pack_file} uploaded to #{attch_uri}" end end end
Version data entries
9 entries across 9 versions & 1 rubygems