Build and publish¶
Currently, we build NEST Desktop for multiple targets and publish them on various platforms.
Note
Please be aware that a lot of steps are already covered by our GitLab CI process.
Therefore, we recommend to inspect the .gitlab-ci.yml
file together with this chapter.
It might also be helpful to have a look at the commands defined in package.json
.
Python¶
Building and pushing NEST Desktop on PyPI is a required step for the production. After that, Docker Hub can upgrade NEST Desktop in the provided Docker image.
- Requirements
- setuptools, wheel, twine
The Python Package Index nest-desktop includes an executive command nest-desktop
and a Python library
nest_desktop
.
Build¶
The current working directory is nest-desktop
.
The building phase contains two steps:
First, build a package of NEST Desktop using vue-cli-service
.
Initially, you have to upgrade the version of nest-desktop in:
packages.json
nest_desktop/__init__.py
Then generate the app package using yarn
. It builds the folder nest_desktop/app
:
yarn build
The second step is to build a pip package for PyPI:
rm -rf build/ dist/ nest_desktop.egg-info/
Then generate the distribution packages of nest-desktop for PyPI:
python3 setup.py sdist bdist_wheel
Upload¶
Finally, the package is ready for the the publication. You can upload the pip-package of nest-desktop
to PyPI:
python3 -m twine upload dist/*
Do not forget to commit the changes you made and set a new version tag in git.
git tag -a v3.0 -m 'v3.0.0'
git push --tags
Conda¶
We have a conda-smithy repository for nest-desktop.
When a new Python package is released, we can change the version in meta.yaml
( the meta content online):
{% set version = "3.x.y" %}
Note
It is also important to change the sha256
checksum of the source of tar.gz
file.
Then make a pull request on the base branch of this repository.
Electron (.deb
package)¶
In package.json
, there are also yarn commands configured to build an Electron app.
yarn electron:build
Then install the .deb
file on your Linux system.
See also
If you want to build other Electron packages, please have a look into electron-builder.yml
file.
Snap (.snap
package)¶
By default snapcraft runs with 2G memory, which is not enough for building electron. To use snapcraft with larger memory:
SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G snapcraft
Then install the snap file locally:
sudo snapcraft install <snap-file> --dangerous
Finally, upload the snap file:
snapcraft upload <snap-file>
See also
For Snap packages, you can find more information in the Snap repository for nest-desktop.