chore: adopt k3s-style versioning convention #51

Merged
gofix merged 1 commit from chore/adopt-k3s-style-versioning into master 2026-05-03 14:51:59 +00:00
Owner

Summary

  • Switch release tag scheme to v<upstream>+rs.<n> (k3s/k0s convention) so both upstream portal-tunnel compat version and Rust port build counter are visible.
  • Inject PORTAL_RS_BUILD at compile time via build.rs; --version now prints portal-relay 2.1.8+rs.N plus compatible with portal-tunnel v2.1.8.
  • Container-image workflow rewrites +- for OCI tags and forwards the rs.N segment as a build-arg.
  • Workspace version = "2.1.8" (tracks upstream); crate inherits.
  • Add top-level README documenting compat target and tag scheme.

Why

Current v2.1.8-rs.devN tags don't cleanly distinguish dev iterations from stable port builds, and conflate the upstream compat version with port iteration in a way that doesn't match common conventions for upstream-tracking distributions. This switches to the k3s/k0s pattern, which is the closest precedent for a lightweight reimplementation that aims for 1:1 compatibility with a tracked upstream.

Versioning convention going forward

v2.1.8+rs.1     first stable build for upstream v2.1.8
v2.1.8+rs.2     same upstream, port-only patch
v2.1.9+rs.1     new upstream target, counter resets

Container image tags substitute +- (e.g., v2.1.8-rs.1) since OCI tag spec disallows +.

Test plan

  • cargo build --release succeeds with new workspace version.
  • PORTAL_RS_BUILD=rs.1 cargo build--version prints portal-relay 2.1.8+rs.1 / compatible with portal-tunnel v2.1.8.
  • Default build (no env) → portal-relay 2.1.8+rs.dev.
  • Container workflow YAML parses (python3 -c 'import yaml; yaml.safe_load(open(...))').
  • First release tag v2.1.8+rs.1 triggers image build with code.rly.best/gofix/portal-tunnel-rs:v2.1.8-rs.1 (verify after merge).
## Summary - Switch release tag scheme to `v<upstream>+rs.<n>` (k3s/k0s convention) so both upstream portal-tunnel compat version and Rust port build counter are visible. - Inject `PORTAL_RS_BUILD` at compile time via `build.rs`; `--version` now prints `portal-relay 2.1.8+rs.N` plus `compatible with portal-tunnel v2.1.8`. - Container-image workflow rewrites `+` → `-` for OCI tags and forwards the `rs.N` segment as a build-arg. - Workspace `version = "2.1.8"` (tracks upstream); crate inherits. - Add top-level README documenting compat target and tag scheme. ## Why Current `v2.1.8-rs.devN` tags don't cleanly distinguish dev iterations from stable port builds, and conflate the upstream compat version with port iteration in a way that doesn't match common conventions for upstream-tracking distributions. This switches to the k3s/k0s pattern, which is the closest precedent for a lightweight reimplementation that aims for 1:1 compatibility with a tracked upstream. ## Versioning convention going forward ``` v2.1.8+rs.1 first stable build for upstream v2.1.8 v2.1.8+rs.2 same upstream, port-only patch v2.1.9+rs.1 new upstream target, counter resets ``` Container image tags substitute `+` → `-` (e.g., `v2.1.8-rs.1`) since OCI tag spec disallows `+`. ## Test plan - [x] `cargo build --release` succeeds with new workspace version. - [x] `PORTAL_RS_BUILD=rs.1 cargo build` → `--version` prints `portal-relay 2.1.8+rs.1` / `compatible with portal-tunnel v2.1.8`. - [x] Default build (no env) → `portal-relay 2.1.8+rs.dev`. - [x] Container workflow YAML parses (`python3 -c 'import yaml; yaml.safe_load(open(...))'`). - [ ] First release tag `v2.1.8+rs.1` triggers image build with `code.rly.best/gofix/portal-tunnel-rs:v2.1.8-rs.1` (verify after merge).
chore: adopt k3s-style versioning convention
Some checks failed
Rust CI / Format, lint, and test (pull_request) Failing after 3s
71260e42e5
Switch release tags from `v2.1.8-rs.devN` to `v<upstream>+rs.<n>` so the
upstream portal-tunnel compatibility version and the Rust port build
counter are both visible in the tag, matching the convention used by k3s
and k0s for upstream-tracking distributions.

- Workspace `version = "2.1.8"` (tracks upstream compat); crate inherits.
- New `build.rs` injects `PORTAL_RS_BUILD` at compile time; clap renders
  `portal-relay 2.1.8+rs.N` plus a `compatible with portal-tunnel v2.1.8`
  line in `--version` output. Defaults to `rs.dev` for unreleased builds.
- `Dockerfile` accepts the build arg and forwards it as an env var.
- Container-image workflow rewrites `+` to `-` for OCI tags (which
  disallow `+`) and parses the `rs.N` segment out of the git ref to pass
  to the build.
- Add a top-level README documenting the compatibility target and tag
  scheme.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
gofix merged commit 7b9e166e26 into master 2026-05-03 14:51:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gofix/portal-tunnel-rs!51
No description provided.