Skip to content

Build and test a release

  1. Set the version in internal/version/version.go, apps/admin-web/package.json and package-lock.json. A Go test checks that the three agree.
  2. Add an entry to CHANGELOG.md.
  3. Run the checks:
    • go vet ./... and go test ./... in golang:1.23-bookworm with libsqlite3-dev
    • npm ci, npm run typecheck and npm run build in apps/admin-web

Needs Docker Desktop and WiX Toolset 3.14.

Terminal window
powershell -ExecutionPolicy Bypass -File distributions\release\build-release.ps1

-SkipImages reuses existing loka-server:<v> / loka-mapcache:<v> images. The script never touches running containers or data volumes. Output goes to dist\<v>\:

File Content
loka-server-<v>-docker.zip / .tar.gz Docker bundle: images, compose.yml, env.example, loka.ps1, loka.sh
loka-server_<v>_amd64.deb Native package. Binary and console are copied from the tested image
LokaServer-<v>-x64.msi Per-user MSI containing the Docker bundle and Start menu shortcuts
LokaServer-<v>-Setup.exe Burn setup: checks for Docker Desktop, then installs the MSI
SHA256SUMS Checksums of the five files

distributions/release/smoke.py URL --setup-code CODE creates a throwaway administrator and checks the production path:

  • the console
  • login and CSRF
  • GeoTIFF import, then MapServer WMS
  • Shapefile ZIP import, then WFS
  • an elevation layer and a terrain profile (loka-analysis)
  • a MapCache tile
  • an API token
  • that anonymous access is refused

Never run it against an installation with real data.

Docker bundle: use a test .env with another project, volume and port (for example LOKA_PROJECT=loka-smoke, LOKA_VOLUME=loka-smoke-data, port 18080). Then run loka.ps1 install or loka.sh install, smoke.py, backup, restore (without the flag it must refuse; with --replace-live-data it restores), and upgrade.

.deb: build a systemd container image from debian:trixie or ubuntu:24.04 with systemd, python3 and curl. Run it with --privileged --cgroupns=host -v /sys/fs/cgroup:/sys/fs/cgroup:rw and /sbin/init. Then:

  1. apt install ./loka-server_<v>_amd64.deb
  2. Check that systemctl is-active loka loka-mapcache is active and that nothing listens on port 80. Check that loka-analysis and loka-mil are on the PATH and that /usr/share/loka/mil-sym/C5Ren.cjs exists (terrain analysis and MIL-STD-2525 need them).
  3. Run smoke.py inside the container.
  4. Run loka-backup, then apt purge; the data must be kept.
  5. Reinstall; no new setup may be required.

Windows:

  1. Run Setup.exe /quiet LokaNoSetup=1 (installs the files without starting Loka).
  2. Check the files and the Start menu shortcuts.
  3. Run the installed loka.ps1 install -ConfigDir <test dir> with a test .env, then smoke.py.
  4. Run Setup.exe /uninstall /quiet: program files, menu, registry and Apps entry are removed; the volume and %LOCALAPPDATA%\Loka Server are kept.
  5. Once by hand: double-click Setup.exe on a machine with Docker Desktop and follow the console window.

Record the results in the release notes, then commit and tag v<v>.