File tree Expand file tree Collapse file tree 6 files changed +72
-2
lines changed Expand file tree Collapse file tree 6 files changed +72
-2
lines changed Original file line number Diff line number Diff line change 60
60
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61
61
PYPI_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
62
62
PYPI_USERNAME : ${{ secrets.PYPI_USERNAME }}
63
+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
64
+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
63
65
- name : sleep for 5 minutes for PyPI update
64
66
if : contains(steps.new_release.outputs.tag, '.')
65
67
run : sleep 300s
Original file line number Diff line number Diff line change 6
6
[
7
7
" @semantic-release/exec" ,
8
8
{
9
- "publishCmd" : " bash deploy.sh"
9
+ "publishCmd" : " bash deploy.sh ${nextRelease.version} "
10
10
}
11
11
]
12
12
]
Original file line number Diff line number Diff line change
1
+ FROM python:3.7-slim
2
+
3
+ LABEL maintainer="Ladybug Tools" email="info@ladybug.tools"
4
+
5
+ ENV HOMEDIR='/home/ladybugbot'
6
+ ENV PATH="${HOMEDIR}/.local/bin:${PATH}"
7
+ ENV LIBRARYDIR="${HOMEDIR}/lib"
8
+ ENV RUNDIR="${HOMEDIR}/run"
9
+
10
+ RUN apt-get update \
11
+ && apt-get -y install --no-install-recommends git \
12
+ && apt-get clean \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Create non-root user
16
+ RUN adduser ladybugbot --uid 1000 --disabled-password --gecos ""
17
+ USER ladybugbot
18
+ WORKDIR ${HOMEDIR}
19
+ RUN mkdir ladybug_tools && touch ladybug_tools/config.json
20
+
21
+ # Install lbt-honeybee
22
+ COPY honeybee_display ${LIBRARYDIR}/honeybee_display
23
+ COPY .git ${LIBRARYDIR}/.git
24
+ COPY setup.py ${LIBRARYDIR}
25
+ COPY setup.cfg ${LIBRARYDIR}
26
+ COPY requirements.txt ${LIBRARYDIR}
27
+ COPY README.md ${LIBRARYDIR}
28
+ COPY LICENSE ${LIBRARYDIR}
29
+
30
+ USER root
31
+ RUN pip3 install --no-cache-dir setuptools wheel\
32
+ && pip3 install --no-cache-dir ${LIBRARYDIR}[full] \
33
+ && apt-get -y --purge remove git \
34
+ && apt-get -y clean \
35
+ && apt-get -y autoremove \
36
+ && rm -rf ${LIBRARYDIR}/.git
37
+
38
+ USER ladybugbot
39
+ # Set up working directory
40
+ RUN mkdir -p ${RUNDIR}/simulation
41
+ WORKDIR ${RUNDIR}
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ if [ -n " $1 " ]
4
+ then
5
+ NEXT_RELEASE_VERSION=$1
6
+ else
7
+ echo " A release version must be supplied"
8
+ exit 1
9
+ fi
10
+
11
+ CONTAINER_NAME=" ladybugtools/honeybee-display"
12
+
13
+ echo " PyPi Deployment..."
3
14
echo " Building distribution"
4
15
python setup.py sdist bdist_wheel
5
16
echo " Pushing new version to PyPi"
6
17
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
18
+
19
+
20
+ echo " Docker Deployment..."
21
+ echo " Login to Docker"
22
+ echo " $DOCKER_PASSWORD " | docker login -u " $DOCKER_USERNAME " --password-stdin
23
+
24
+ docker build . -t $CONTAINER_NAME :$NEXT_RELEASE_VERSION
25
+ docker tag $CONTAINER_NAME :$NEXT_RELEASE_VERSION $CONTAINER_NAME :latest
26
+
27
+ docker push $CONTAINER_NAME :latest
28
+ docker push $CONTAINER_NAME :$NEXT_RELEASE_VERSION
Original file line number Diff line number Diff line change 1
- ladybug-display >= 0.6.4
1
+ ladybug-display >= 0.6.6
2
2
honeybee-core >= 1.54.2
Original file line number Diff line number Diff line change 6
6
with open ('requirements.txt' ) as f :
7
7
requirements = f .read ().splitlines ()
8
8
9
+ full_requirements = ['honeybee-energy' , 'honeybee-radiance' , 'ladybug-vtk' ]
10
+
9
11
setuptools .setup (
10
12
name = "honeybee-display" ,
11
13
use_scm_version = True ,
18
20
url = "https://github.com/ladybug-tools/honeybee-display" ,
19
21
packages = setuptools .find_packages (exclude = ["tests*" ]),
20
22
install_requires = requirements ,
23
+ extras_require = {
24
+ 'full' : full_requirements
25
+ },
21
26
entry_points = {
22
27
"console_scripts" : ["honeybee-display = honeybee_display.cli:display" ]
23
28
},
You can’t perform that action at this time.
0 commit comments