Skip to content

Commit 4f10c03

Browse files
build(travis): update deployment files
1 parent 55dd9e4 commit 4f10c03

File tree

3 files changed

+16
-32
lines changed

3 files changed

+16
-32
lines changed

.releaserc.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
"@semantic-release/commit-analyzer",
44
"@semantic-release/release-notes-generator",
55
"@semantic-release/github",
6-
[
7-
"@semantic-release/exec",
8-
{
9-
"publishCmd": "bash deploy.sh ${nextRelease.version}"
10-
}
11-
]
6+
["@semantic-release/exec", {
7+
"publishCmd": "bash deploy.sh ${nextRelease.version}"
8+
}]
129
]
1310
}

.travis.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: python
33
python:
44
- "2.7"
55
- "3.6"
6+
- "3.7"
67

78
install:
89
- pip install -r dev-requirements.txt
@@ -19,16 +20,22 @@ jobs:
1920
- stage: deploy
2021
if: branch = master AND (NOT type IN (pull_request))
2122
before_install:
22-
- npm i -g npm@6.6.0
23+
- nvm install lts/* --latest-npm
2324
python:
24-
- "3.6"
25+
- "3.7"
2526
install:
2627
- pip install -r dev-requirements.txt
28+
- pip install -r requirements.txt
2729
- npm install @semantic-release/exec
2830
script:
2931
- git config --global user.email "[email protected]"
3032
- git config --global user.name "ladybugbot"
3133
- npx semantic-release
34+
- stage: docs
35+
if: branch = master AND (NOT type IN (pull_request))
36+
script:
37+
- sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_radiance_folder
38+
- sphinx-build -b html ./docs ./docs/_build/docs
3239
deploy:
3340
provider: pages
3441
skip_cleanup: true

deploy.sh

+4-24
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
#!/bin/sh
22

3-
deploy_to_pypi() {
4-
echo "Building distribution"
5-
python setup.py sdist bdist_wheel
6-
echo "Pushing new version to PyPi"
7-
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
8-
}
9-
10-
build_docs() {
11-
echo "Building documentation files"
12-
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_radiance_folder
13-
sphinx-build -b html ./docs ./docs/_build/docs -D release=$1 -D version=$1
14-
}
15-
16-
17-
if [ -n "$1" ]
18-
then
19-
NEXT_RELEASE_VERSION=$1
20-
else
21-
echo "A release version must be supplied"
22-
exit 1
23-
fi
24-
25-
deploy_to_pypi
26-
build_docs $NEXT_RELEASE_VERSION
3+
echo "Building distribution"
4+
python setup.py sdist bdist_wheel
5+
echo "Pushing new version to PyPi"
6+
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD

0 commit comments

Comments
 (0)