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:
- Package artifacts using
scripts/release/package.ps1 - 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/**/bundleoutput from Tauri. - Copies the bundle to
artifacts/bundle. - Renames
*.msi.sigto.sig. - Writes
artifacts/release-version.txtfromcore/Cargo.toml. - Copies
artifacts/release-metadata.jsonwhen 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 fromartifacts/bundle-SignaturePath(optional, defaults to.signext to MSI)-ReleaseChannel(alpha|beta|stableor0|1|2, defaultstable)-BumpKind(major|minor|patchor0|1|2, defaultpatch)-Component(default0for SpacePOS)-OS(default0for Windows)-Notes-ReleaseScopeJsonor-ReleaseScopeBase64(optional scope)
Base URL resolution:
mainbranch ->https://api.erp.tramston.com- any other branch ->
https://api.dev.tramsuite.com
Authentication:
- ERP expects
x-release-client-idandx-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:
POSComponentReadyEventPOSComponentAppliedEvent
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"
