forked from ladybug-tools/ladybug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deploy): use javascript semantic-release package for deployment
Using the "pure" javascript implementation of semantic-release makes it a bit more flexible to set up custom scripts to run at different stages of the semantic release process. The packages used as well as scripts to run at different stages are specified in the .releaserc.json file. In this case we use standard semantic-release and add a custom deploy script on top of the normal github release setup. The custom deploy script is the new 'deploy.sh' file which takes the new version number as an argument to deploy the package to PyPi and build the documentation. ladybug-tools#125
- Loading branch information
1 parent
3beb29b
commit 5722049
Showing
8 changed files
with
85 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
["@semantic-release/exec", { | ||
"publishCmd": "bash deploy.sh ${nextRelease.version}" | ||
}] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
deploy_to_pypi() { | ||
echo "Building distribution" | ||
python setup.py sdist bdist_wheel | ||
echo "Pushing new version to PyPi" | ||
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD | ||
} | ||
|
||
build_docs() { | ||
echo "Building documentation files" | ||
sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug ./ladybug/euclid.py | ||
sphinx-build -b html ./docs ./docs/_build/docs -D release=$1 -D version=$1 | ||
} | ||
|
||
|
||
if [ -n "$1" ] | ||
then | ||
NEXT_RELEASE_VERSION=$1 | ||
else | ||
echo "A release version must be supplied" | ||
exit 1 | ||
fi | ||
|
||
deploy_to_pypi | ||
build_docs $NEXT_RELEASE_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
atomicwrites==1.2.1 | ||
attrs==18.2.0 | ||
certifi==2018.11.29 | ||
alabaster==0.7.12 | ||
Babel==2.6.0 | ||
bleach==3.1.0 | ||
certifi==2019.3.9 | ||
chardet==3.0.4 | ||
coverage==4.5.2 | ||
coveralls==1.5.1 | ||
docopt==0.6.2 | ||
euclid3==0.1 | ||
docutils==0.14 | ||
idna==2.8 | ||
more-itertools==5.0.0 | ||
pluggy==0.8.0 | ||
py==1.7.0 | ||
pytest==4.1.0 | ||
pytest-cov==2.6.1 | ||
imagesize==1.1.0 | ||
Jinja2==2.10 | ||
MarkupSafe==1.1.1 | ||
packaging==19.0 | ||
pkginfo==1.5.0.1 | ||
Pygments==2.3.1 | ||
pyparsing==2.3.1 | ||
pytz==2018.9 | ||
readme-renderer==24.0 | ||
requests==2.21.0 | ||
requests-toolbelt==0.9.1 | ||
six==1.12.0 | ||
snowballstemmer==1.2.1 | ||
Sphinx==1.8.5 | ||
sphinx-bootstrap-theme==0.6.5 | ||
sphinxcontrib-fulltoc==1.2.0 | ||
sphinxcontrib-websupport==1.1.0 | ||
tqdm==4.31.1 | ||
twine==1.13.0 | ||
urllib3==1.24.1 | ||
webencodings==0.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[semantic_release] | ||
version_variable = ladybug/__init__.py:__version__ | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters