fix(order_utils.py): publish docs to S3, not RTD (#1264)
Publishing to readthedocs.io (RTD) wasn't working, for various reasons. Changed to publish docs to S3.
This commit is contained in:
13
python-packages/order_utils/.discharge.json
Normal file
13
python-packages/order_utils/.discharge.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"domain": "0x-order-utils-py",
|
||||
"build_command": "python setup.py build_sphinx",
|
||||
"upload_directory": "build/docs/html",
|
||||
"index_key": "index.html",
|
||||
"error_key": "index.html",
|
||||
"trailing_slashes": true,
|
||||
"cache": 3600,
|
||||
"aws_profile": "default",
|
||||
"aws_region": "us-east-1",
|
||||
"cdn": false,
|
||||
"dns_configured": true
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
|
||||
0x order-related utilities for those developing on top of 0x protocol.
|
||||
|
||||
Read the [documentation](https://0x.readthedocs.io/projects/order-utils/en/latest/)
|
||||
Read the [documentation](http://0x-order-utils-py.s3-website-us-east-1.amazonaws.com/)
|
||||
|
||||
## Installing
|
||||
|
||||
|
@@ -116,6 +116,19 @@ class PublishCommand(distutils.command.build_py.build_py):
|
||||
subprocess.check_call("twine upload dist/*".split()) # nosec
|
||||
|
||||
|
||||
class PublishDocsCommand(distutils.command.build_py.build_py):
|
||||
"""Custom command to publish docs to S3."""
|
||||
|
||||
description = (
|
||||
"Publish docs to "
|
||||
+ "http://0x-order-utils-py.s3-website-us-east-1.amazonaws.com/"
|
||||
)
|
||||
|
||||
def run(self):
|
||||
"""Run npm package `discharge` to build & upload docs."""
|
||||
subprocess.check_call("discharge deploy".split()) # nosec
|
||||
|
||||
|
||||
class GanacheCommand(distutils.command.build_py.build_py):
|
||||
"""Custom command to publish to pypi.org."""
|
||||
|
||||
@@ -141,7 +154,7 @@ with open("README.md", "r") as file_handle:
|
||||
|
||||
setup(
|
||||
name="0x-order-utils",
|
||||
version="0.1.0",
|
||||
version="1.0.1",
|
||||
description="Order utilities for 0x applications",
|
||||
long_description=README_MD,
|
||||
long_description_content_type="text/markdown",
|
||||
@@ -154,6 +167,7 @@ setup(
|
||||
"test": TestCommandExtension,
|
||||
"test_publish": TestPublishCommand,
|
||||
"publish": PublishCommand,
|
||||
"publish_docs": PublishDocsCommand,
|
||||
"ganache": GanacheCommand,
|
||||
},
|
||||
install_requires=[
|
||||
|
Reference in New Issue
Block a user