Skip to content

Update

The update is a single command and pulls the latest version from git. If no mode is supplied, it is read from the installation record.

powershell -ExecutionPolicy Bypass -File .\scripts\windows\update.ps1
sudo ./scripts/linux/update.sh

Flow

  1. The existing installation and the installed version are read → Current version: X.
  2. backend/.env is backed up (.env.bak.<timestamp>); .env itself is never modified.
  3. Git state is validated: on a dirty working tree, the wrong branch or a non-fast-forward situation it stops safely — reset --hard is not used, and user data is never silently deleted.
  4. The latest version is fetched with git fetch + git pull --ff-only → Target version: Y.
  5. If the version and the commit are unchanged, the operation is a NO-OP (Already up to date).
  6. Dependencies/builds are refreshed; in Docker mode the images are rebuilt and restarted in a controlled way, in native mode the build is refreshed and the services are restarted.
  7. A healthcheck runs. If it fails, the update is not considered SUCCESS and a controlled rollback to the previous commit is performed.

Options

Windows Linux Description
-Mode auto\|docker\|native --mode auto\|docker\|native Installation type
-Branch <name> --branch <name> Production branch (default: the current checkout)
— --remote <name> Git remote (default: origin)
-NoPull --no-pull Rebuild/restart only, without pulling from git
-Force --force Rebuilds even when the version/commit is unchanged
-DryRun --dry-run Lists what would be done without changing anything

Version behaviour

The single source of truth is the VERSION file at the repository root (semantic versioning). The installed version, mode and commit are kept in the installation state file:

  • Linux: /var/lib/iqv-platform/installed-version (root) or ~/.local/state/iqv-platform/installed-version
  • Windows: %ProgramData%\iqv-platform\installed-version

The update output shows the version before and after the update; the major/minor/patch difference is reported separately.