DevelopersTechnologySpacepos Releases
Technology

SpacePOS Releases

Overview

SpacePOS releases are packaged in CI, uploaded to the ERP API, and surfaced in the app via the pending releases endpoint. The primary artifact for SpacePOS is the Windows MSI produced by Tauri.

CI/CD (TeamCity)

Release steps typically run in this order:

  1. Package artifacts using scripts/release/package.ps1
  2. Upload the release using scripts/release/upload.ps1

Recommended TeamCity parameters:

  • RELEASE_CLIENT_ID, RELEASE_CLIENT_SECRET (for ERP upload auth)
  • TEAMCITY_BUILD_BRANCH (used to resolve base URL)

Packaging (scripts/release/package.ps1)

package.ps1:

  • Locates the target/**/bundle output from Tauri.
  • Copies the bundle to artifacts/bundle.
  • Renames *.msi.sig to .sig.
  • Writes artifacts/release-version.txt from core/Cargo.toml.
  • Copies artifacts/release-metadata.json when present.

The MSI in artifacts/bundle is the upload artifact for SpacePOS.

Uploading (scripts/release/upload.ps1)

upload.ps1 posts multipart form data to /api/apps/releases.

Key parameters:

  • -ArtifactPath (optional) or auto-detect MSI from artifacts/bundle
  • -SignaturePath (optional, defaults to .sig next to MSI)
  • -ReleaseChannel (alpha|beta|stable or 0|1|2, default stable)
  • -BumpKind (major|minor|patch or 0|1|2, default patch)
  • -Component (default 0 for SpacePOS)
  • -OS (default 0 for Windows)
  • -Notes
  • -ReleaseScopeJson or -ReleaseScopeBase64 (optional scope)

Base URL resolution:

  • main branch -> https://api.erp.tramston.com
  • any other branch -> https://api.dev.tramsuite.com

Authentication:

  • ERP expects x-release-client-id and x-release-client-secret.
  • The script reads them from RELEASE_CLIENT_ID / RELEASE_CLIENT_SECRET.

Release scope payload

Release scopes are optional. If provided, the script flattens the JSON into ScopeSelectionStrategy.* form fields.

Example JSON:

{
  "ReplaceExisting": true,
  "Selections": [
    {
      "TenantCode": "TENANT",
      "CompanyCode": "COMP",
      "LocationCode": "LOC",
      "Domains": [
        {
          "DomainType": "POSTerminal",
          "Ids": ["<terminal-id>"]
        }
      ]
    }
  ]
}

SpaceFuel extension releases

SpaceFuel is a Windows service extension staged by SpacePOS:

  • Staged into extensions/spacefuel/{blue,green}.
  • The active slot is tracked in state.json.
  • The UI surfaces it alongside SpacePOS updates.

When uploading a SpaceFuel release, use the correct component value and artifact type expected by the backend.

Update tracking events

SpacePOS emits AMQP events to let ERP track staged/applied updates:

  • POSComponentReadyEvent
  • POSComponentAppliedEvent

Example TeamCity steps

.\scripts\release\package.ps1 -Target x86_64-pc-windows-msvc -ArtifactDir artifacts
.\scripts\release\upload.ps1 -ArtifactsDir artifacts -ReleaseChannel stable -BumpKind patch -Component 0 -OS 0 -Notes "Release notes"