Skip to content

Commit

Permalink
Merge b309b51 into 35e0f12
Browse files Browse the repository at this point in the history
  • Loading branch information
svenfuchs committed Aug 20, 2019
2 parents 35e0f12 + b309b51 commit 3e8bfde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/dpl/providers/pypi.rb
Expand Up @@ -18,8 +18,8 @@ class Pypi < Provider
opt '--server SERVER', 'Release to a different index', default: 'https://upload.pypi.org/legacy/'
opt '--distributions DISTS', 'Space-separated list of distributions to be uploaded to PyPI', default: 'sdist'
opt '--docs_dir DIR', 'Path to the directory to upload documentation from', default: 'build/docs'
opt '--skip_upload_docs', 'Skip uploading documentation. Note that upload.pypi.org does not support uploading documentation.', default: true, type: :boolean, see: 'https://github.com/travis-ci/dpl/issues/660'
opt '--skip_existing', 'Do not overwrite an existing file with the same name on the server.'
opt '--upload_docs', 'Upload documentation', default: false, type: :boolean, note: 'most PyPI servers, including upload.pypi.org, do not support uploading documentation'
opt '--setuptools_version VER', format: VERSION
opt '--twine_version VER', format: VERSION
opt '--wheel_version VER', format: VERSION
Expand Down Expand Up @@ -51,7 +51,7 @@ def deploy
shell :setup_py
shell :twine_upload
shell :rm_dist
upload_docs unless skip_upload_docs?
upload_docs if upload_docs?
end

private
Expand Down
12 changes: 6 additions & 6 deletions spec/dpl/providers/pypi_spec.rb
Expand Up @@ -37,16 +37,16 @@
it { should have_run 'python setup.py other' }
end

describe 'given --no-skip_upload_docs' do
it { should have_run 'python setup.py upload_docs --upload-dir build/docs -r https://upload.pypi.org/legacy/' }
describe 'given --skip_existing' do
it { should have_run 'twine upload --skip-existing -r pypi dist/*' }
end

describe 'given --no-skip_upload_docs --docs_dir ./docs' do
it { should have_run 'python setup.py upload_docs --upload-dir ./docs -r https://upload.pypi.org/legacy/' }
describe 'given --upload_docs' do
it { should have_run 'python setup.py upload_docs --upload-dir build/docs -r https://upload.pypi.org/legacy/' }
end

describe 'given --skip_existing' do
it { should have_run 'twine upload --skip-existing -r pypi dist/*' }
describe 'given --upload_docs --docs_dir ./docs' do
it { should have_run 'python setup.py upload_docs --upload-dir ./docs -r https://upload.pypi.org/legacy/' }
end

describe 'given --setuptools_version 1.0.0' do
Expand Down

0 comments on commit 3e8bfde

Please sign in to comment.