dpl 1.8.40.travis.2174.5 → 1.8.40.travis.2191.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/dpl/provider/pypi.rb +6 -1
- data/spec/provider/pypi_spec.rb +28 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb0941636afe7ce9668e12fb294f96c3e72392f6
|
4
|
+
data.tar.gz: 76a24f2533f07fd142a699cf8464550221edeec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86be8149bddf9b3d4ff95a0d24dd4850c914a9de806b9c4f12f80c7001d037ae2f1b00e60f8dbecd1887eef398671940670998694ebc48bb79ccf0bcd59f1517
|
7
|
+
data.tar.gz: b55e60fcd8d90dc2b42501d87419822e430af9f2da02fdf51cfcecfe33cc6e7d8a34145afd0f0426a75675b54492ea9be7fbdd6053bd57fa9007f350c878d61e
|
data/README.md
CHANGED
@@ -279,9 +279,13 @@ For authentication you can also use Travis CI secure environment variable:
|
|
279
279
|
|
280
280
|
* **user**: PyPI Username.
|
281
281
|
* **password**: PyPI Password.
|
282
|
-
* **server**: Optional. Only required if you want to release to a different index. Follows the form of 'https://mypackageindex.com/index'. Defaults to 'https://pypi.
|
282
|
+
* **server**: Optional. Only required if you want to release to a different index. Follows the form of 'https://mypackageindex.com/index'. Defaults to 'https://upload.pypi.org/legacy/'.
|
283
283
|
* **distributions**: Optional. A space-separated list of distributions to be uploaded to PyPI. Defaults to 'sdist'.
|
284
|
-
* **skip_upload_docs**: Optional. When set to `
|
284
|
+
* **skip_upload_docs**: Optional. When set to `false`, documentation is uploaded. Defaults to `true`.
|
285
|
+
Note that upload.pypi.org does not support document uploading. If you set
|
286
|
+
this option to `false`, your deployment fails, unless you specify the server
|
287
|
+
that supports this option. See https://github.com/travis-ci/dpl/issues/660
|
288
|
+
for details.
|
285
289
|
* **docs_dir**: Optional. A path to the directory to upload documentation from. Defaults to 'build/docs'
|
286
290
|
|
287
291
|
#### Environment variables:
|
data/lib/dpl/provider/pypi.rb
CHANGED
@@ -27,6 +27,11 @@ module DPL
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
def skip_upload_docs?
|
31
|
+
! options.has_key?(:skip_upload_docs) ||
|
32
|
+
(options.has_key?(:skip_upload_docs) && options[:skip_upload_docs])
|
33
|
+
end
|
34
|
+
|
30
35
|
def self.install_setuptools
|
31
36
|
shell 'wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python'
|
32
37
|
shell 'rm -f setuptools-*.zip'
|
@@ -96,7 +101,7 @@ module DPL
|
|
96
101
|
context.shell "python setup.py #{pypi_distributions}"
|
97
102
|
context.shell "twine upload -r pypi dist/*"
|
98
103
|
context.shell "rm -rf dist/*"
|
99
|
-
unless
|
104
|
+
unless skip_upload_docs?
|
100
105
|
log "Uploading documentation (skip with \"skip_upload_docs: true\")"
|
101
106
|
context.shell "python setup.py upload_docs #{pypi_docs_dir_option} -r #{pypi_server}"
|
102
107
|
end
|
data/spec/provider/pypi_spec.rb
CHANGED
@@ -32,7 +32,7 @@ describe DPL::Provider::PyPI do
|
|
32
32
|
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
33
33
|
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
34
34
|
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
35
|
-
expect(provider.context).
|
35
|
+
expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
|
36
36
|
provider.push_app
|
37
37
|
end
|
38
38
|
|
@@ -41,7 +41,7 @@ describe DPL::Provider::PyPI do
|
|
41
41
|
expect(provider.context).to receive(:shell).with("python setup.py sdist bdist")
|
42
42
|
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
43
43
|
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
44
|
-
expect(provider.context).
|
44
|
+
expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
|
45
45
|
provider.push_app
|
46
46
|
end
|
47
47
|
|
@@ -50,16 +50,7 @@ describe DPL::Provider::PyPI do
|
|
50
50
|
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
51
51
|
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
52
52
|
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
53
|
-
expect(provider.context).
|
54
|
-
provider.push_app
|
55
|
-
end
|
56
|
-
|
57
|
-
example "with :docs_dir option" do
|
58
|
-
provider.options.update(:docs_dir => 'some/dir')
|
59
|
-
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
60
|
-
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
61
|
-
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
62
|
-
expect(provider.context).to receive(:shell).with("python setup.py upload_docs --upload-dir some/dir -r https://upload.pypi.org/legacy/")
|
53
|
+
expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r http://blah.com")
|
63
54
|
provider.push_app
|
64
55
|
end
|
65
56
|
|
@@ -68,8 +59,33 @@ describe DPL::Provider::PyPI do
|
|
68
59
|
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
69
60
|
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
70
61
|
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
62
|
+
expect(provider.context).not_to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
|
71
63
|
provider.push_app
|
72
64
|
end
|
65
|
+
|
66
|
+
context "with :skip_upload_docs option being false" do
|
67
|
+
before :each do
|
68
|
+
provider.options.update(:skip_upload_docs => false)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "runs upload_docs" do
|
72
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
73
|
+
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
74
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
75
|
+
expect(provider.context).to receive(:shell).with("python setup.py upload_docs -r https://upload.pypi.org/legacy/")
|
76
|
+
provider.push_app
|
77
|
+
end
|
78
|
+
|
79
|
+
example "with :docs_dir option" do
|
80
|
+
provider.options.update(:docs_dir => 'some/dir')
|
81
|
+
expect(provider.context).to receive(:shell).with("python setup.py sdist")
|
82
|
+
expect(provider.context).to receive(:shell).with("twine upload -r pypi dist/*")
|
83
|
+
expect(provider.context).to receive(:shell).with("rm -rf dist/*")
|
84
|
+
expect(provider.context).to receive(:shell).with("python setup.py upload_docs --upload-dir some/dir -r https://upload.pypi.org/legacy/")
|
85
|
+
provider.push_app
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
73
89
|
end
|
74
90
|
|
75
91
|
describe "#write_servers" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dpl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.40.travis.
|
4
|
+
version: 1.8.40.travis.2191.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|