Skip to content

Latest commit

 

History

History
124 lines (87 loc) · 2.93 KB

DEVELOPMENT.md

File metadata and controls

124 lines (87 loc) · 2.93 KB

Freelens development

Nightly builds

You can download the nightly builds of the current main branch.

Build from the source

You can build the application using this repository.

Prerequisites

Install a compiler and Python setuptools, for example:

# Debian/Ubuntu
apt install build-essential python3-setuptools
# MacOS
brew install bash python3-setuptools

Use NVM or mise-en-place to install the required Node.js version.

From the root of this repository:

nvm install
# or
mise install

Build app

npm ci
npm run build
npm run build:app

At this point, for example on Windows, simply go to the "freelens\freelens\dist\win-unpacked" directory and run Freelens.exe.

Cross compilation

You can build arm64 binary on Linux amd64 or amd64 binary on MacOS arm64.

On Linux, install cross-compiler (macOS includes this by default):

# Debian/Ubuntu
apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

Then rebuild binary modules and build with support for all architectures:

# Debian/Ubuntu
env CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npm run rebuild -- -- -a arm64
env DOWNLOAD_ALL_ARCHITECTURES=true npm run build
# MacOS
npm run rebuild -- -- -a arm64
env DOWNLOAD_ALL_ARCHITECTURES=true npm run build

Finally, generate binary packages:

# Debian/Ubuntu
npm run build:app -- -- -- AppImage deb --publish never --arm64
# MacOS
npm run build:app -- -- -- dmg pkg --publish never --x86

Run app

To run the app in developer mode:

npm run start-dev

Additional components

This application uses additional components hosted in separate repositories:

It bundles binaries for:

The Renovate bot keeps the versions up-to-date.

The Automated kubectl versions workflow updates the list of the latest kubectl patch versions for each minor version.

Distribution

Additional repositories for distributing packages:

Releasing

The Automated npm version workflow prepares a new PR for semantic versioning. After the PR is merged, the Release workflow handles the release process:

  1. Prepares a new draft release.
  2. Builds and notarizes binaries for each supported OS and architecture.
  3. Finalizes the new release.
  4. Publishes NPM packages.
  5. Adds the indexes for APT repository.