lib/dpl/provider/pypi.rb in dpl-1.8.40.travis.2174.5 vs lib/dpl/provider/pypi.rb in dpl-1.8.40.travis.2191.5
- old
+ new
@@ -25,10 +25,15 @@
if !docs_dir.empty?
'--upload-dir ' + docs_dir
end
end
+ def skip_upload_docs?
+ ! options.has_key?(:skip_upload_docs) ||
+ (options.has_key?(:skip_upload_docs) && options[:skip_upload_docs])
+ end
+
def self.install_setuptools
shell 'wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python'
shell 'rm -f setuptools-*.zip'
end
@@ -94,10 +99,10 @@
def push_app
context.shell "python setup.py #{pypi_distributions}"
context.shell "twine upload -r pypi dist/*"
context.shell "rm -rf dist/*"
- unless options[:skip_upload_docs]
+ unless skip_upload_docs?
log "Uploading documentation (skip with \"skip_upload_docs: true\")"
context.shell "python setup.py upload_docs #{pypi_docs_dir_option} -r #{pypi_server}"
end
end
end