Build and test a release
1. Before the build
Section titled “1. Before the build”- Set the version in
internal/version/version.go,apps/admin-web/package.jsonandpackage-lock.json. A Go test checks that the three agree. - Add an entry to
CHANGELOG.md. - Run the checks:
go vet ./...andgo test ./...ingolang:1.23-bookwormwithlibsqlite3-devnpm ci,npm run typecheckandnpm run buildinapps/admin-web
2. Build
Section titled “2. Build”Needs Docker Desktop and WiX Toolset 3.14.
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 |
3. Test each package on a fresh install
Section titled “3. Test each package on a fresh install”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:
apt install ./loka-server_<v>_amd64.deb- Check that
systemctl is-active loka loka-mapcacheis active and that nothing listens on port 80. Check thatloka-analysisandloka-milare on the PATH and that/usr/share/loka/mil-sym/C5Ren.cjsexists (terrain analysis and MIL-STD-2525 need them). - Run
smoke.pyinside the container. - Run
loka-backup, thenapt purge; the data must be kept. - Reinstall; no new setup may be required.
Windows:
- Run
Setup.exe /quiet LokaNoSetup=1(installs the files without starting Loka). - Check the files and the Start menu shortcuts.
- Run the installed
loka.ps1 install -ConfigDir <test dir>with a test.env, thensmoke.py. - Run
Setup.exe /uninstall /quiet: program files, menu, registry and Apps entry are removed; the volume and%LOCALAPPDATA%\Loka Serverare kept. - Once by hand: double-click
Setup.exeon a machine with Docker Desktop and follow the console window.
Record the results in the release notes, then commit and tag v<v>.