Skip to content

Releasing and installing a project

Installing lime-buildtools

Warning

Never install lime-buildtools with pip install as it might lead to version conflicts with other packages installed in your global Python environment.

Run the following:

$ pip install pipx
$ pipx install lime-buildtools

Or the following if you want to upgrade your already installed lime-buildtools to the latest version:

$ pipx upgrade lime-buildtools

Info

User and Password for the Lime PyPI can be obtained from Lime Technologies for any customer or partner

Building and releasing

The tool lime-buildtools is responsible for building a Lime project. It will package build any frontend components and create a Python package.

lime-buildtools will read your pyproject.toml and figure out how your solution or package should be built.

[tool.lime.project]
project_type = "solution|package"

Frontend build

Frontend builds are defined in pyproject.toml with the following entry:

    [[tool.lime.static_content]]
        [tool.lime.static_content.build_step]
        cwd = "frontend"
        commands = ["npm ci", "npm run build"]
        [tool.lime.static_content.copy_step]
        source = "frontend/dist"
        destination = "solution_my_solution/web_components/static"

This entry tells `lime-buildtools how to build the frontend part of a package or a solution.

Info

This entry is added when a web-component is generated with lime-project

Local build

A new release of a project can be built with

$ lime-buildtools semantic-release-build

Using GitHub Actions

When you create a new project with lime-project a CI workflow for GitHub Actions is included in the .github folder.

A new version of a package or a solution is automatically created when a commit is pushed to master or a branch is merged to master.

The CI workflows support pre-releases using a branch named dev

Our CI system uses commit messages to determine the type of changes in the codebase and from that it automatically creates changelogs, bumps the version and publishes a new version on our PyPi server. It also publishes your solution on Git as a release asset under the “releases” tab (https://github.com/Lundalogik/<solution-name>/releases).

For this to work, you have to follow these rules when writing commit messages. You can still create commits that don't obey these guidelines but those commits will not trigger any new release to be built.

If you want to see the status of your package build, you can browse to the tab "Actions" in your package repo. Here you can also see the logs if you want to find out why a job failed.

Installing

Installing a package

A package is installed by adding it as a dependency to a solution. This is done by running the following command in your solution.

poetry add <PACKAGE_NAME>

This should resolve in changes in your pyproject.toml file as well as poetry.lock.

You can also run this command to check whether a package is already installed.

poetry show <PACKAGE-NAME>

Installing a solution on-premise

Note that your solution is built for a specific version of Lime CRM. That means that every time you upgrade a server, you need to build the solution again. Otherwise, you might re-install the previous version of Lime CRM when installing the solution.

Follow these steps to install a solution:

  1. Download the wheelhouse of a solution from a github release (https://github.com/Lundalogik/<solution-name>/releases) or a local dist folder (if built using lime-buildtools).

  2. Run the following command to install the solution on a Lime CRM server:

$ limefu solution install <solution-{solution-name}-{suffix}.tar.gz>

Finally, you have to restart every installed lime service such that the customizations in the solution is picked up by Lime CRM. After that, the solution is installed! 🎉