Add SemVer VERSION, Jenkins CI/CD, and release 0.1.1.
Ship Harbor/Hub push with latest+version tags, deploy to vmware.devops.org.ru, and show the package version badge in Help → About.
This commit is contained in:
@@ -122,8 +122,10 @@ def list_majors(
|
||||
*,
|
||||
runtime_version: str | None,
|
||||
settings: Settings | None = None,
|
||||
app_version: str | None = None,
|
||||
) -> dict[str, object]:
|
||||
return {
|
||||
"app_version": app_version,
|
||||
"runtime_version": runtime_version,
|
||||
"majors": [
|
||||
{
|
||||
|
||||
+28
-1
@@ -795,7 +795,12 @@
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
|
||||
.help-about-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.45rem 0.65rem;
|
||||
margin: 0;
|
||||
padding: 0 14px 12px;
|
||||
font-size: 11px;
|
||||
@@ -809,6 +814,22 @@
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.help-about-version {
|
||||
flex-shrink: 0;
|
||||
padding: 0.22rem 0.55rem;
|
||||
border-radius: 999px;
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--accent) 14%, transparent);
|
||||
color: var(--accent);
|
||||
font-family: var(--mono);
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.03em;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.help-panel {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -3971,6 +3992,7 @@
|
||||
major: 9,
|
||||
majors: [],
|
||||
runtimeVersion: null,
|
||||
appVersion: null,
|
||||
catalog: null,
|
||||
method: null,
|
||||
pathValues: {},
|
||||
@@ -6023,6 +6045,7 @@
|
||||
function buildAboutHtml() {
|
||||
const version = state.runtimeVersion || "—";
|
||||
const catalogMajor = state.major || "—";
|
||||
const appVersion = state.appVersion ? `v${state.appVersion}` : "v—";
|
||||
return `
|
||||
<div class="help-about-panel">
|
||||
<div class="help-report-head">
|
||||
@@ -6032,7 +6055,10 @@
|
||||
automation, and infrastructure tooling without a real hypervisor cluster.
|
||||
</p>
|
||||
<p class="help-about-meta">
|
||||
Runtime <code>${escapeHtml(version)}</code> · catalog <code>${escapeHtml(seriesLabel(catalogMajor))}</code>
|
||||
<span class="help-about-version" title="Simulator package version">${escapeHtml(appVersion)}</span>
|
||||
<span>
|
||||
Runtime <code>${escapeHtml(version)}</code> · catalog <code>${escapeHtml(String(catalogMajor))}</code>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="help-report-head">
|
||||
@@ -7189,6 +7215,7 @@
|
||||
async function loadVersions() {
|
||||
const p = await fetch("/ui/api/versions").then((r) => r.json());
|
||||
state.runtimeVersion = p.runtime_version;
|
||||
state.appVersion = p.app_version || null;
|
||||
state.majors = p.majors || [];
|
||||
setText(els.statRuntime, p.runtime_version || "—");
|
||||
const storedMajor = readStoredMajor();
|
||||
|
||||
+7
-2
@@ -18,6 +18,7 @@ from app.dependencies import get_database
|
||||
from app.simulation.seed import apply_seed, build_profile, simulation_state_summary
|
||||
from app.web.assets import compact_console_html, console_html
|
||||
from app.web.compatibility_catalog import compatibility_payload
|
||||
from app.version import get_app_version
|
||||
from app.web.contract_catalog import catalog_payload, list_majors, load_snapshot, method_payload
|
||||
|
||||
router = APIRouter(tags=["Simulator"])
|
||||
@@ -55,8 +56,12 @@ async def ui_versions(request: Request) -> JSONResponse:
|
||||
if _use_vsphere_plane(request):
|
||||
from app.vsphere.contracts.catalog import list_vsphere_majors
|
||||
|
||||
return JSONResponse(list_vsphere_majors(runtime_version=runtime_version))
|
||||
return JSONResponse(list_majors(runtime_version=runtime_version, settings=settings))
|
||||
payload = list_vsphere_majors(runtime_version=runtime_version)
|
||||
else:
|
||||
payload = list_majors(runtime_version=runtime_version, settings=settings)
|
||||
if isinstance(payload, dict):
|
||||
payload = {**payload, "app_version": get_app_version()}
|
||||
return JSONResponse(payload)
|
||||
|
||||
|
||||
@router.get("/ui/api/catalog", include_in_schema=False)
|
||||
|
||||
Reference in New Issue
Block a user